diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -19,7 +19,7 @@
         C = C - 1
     while X[i] >= 5 and B > 0:
         X[i] = X[i] - 5
-        B = -1
+        B = B - 1
     while X[i] >= 1 and A > 0:
         X[i] = X[i] - 1
         A = A - 1
