diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -11,7 +11,7 @@
     f = 0
     for c in s:
         x = int(c)
-        f = (f * 10 + x) % MOD
+        f = (f * 10 + sum_f * x) % MOD
         sum_f += f
     print(f)
 
