diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -4,6 +4,6 @@
 for i in range(1, N + 1):
     if i == M:
         count += 1
-        M = M + P * count
+        M = M + P
 
 print(count)
