diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -12,7 +12,7 @@
         s = bin(start)[2:].zfill(50)
         g = bin(goal)[2:].zfill(50)
         count = 0
-        for i in range(51):
+        for i in range(50):
             if s[i] != g[i]:
                 count += 1
         return count
