diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -5,7 +5,7 @@
     N = int(input())
     num = int(math.sqrt(N) + 1e-9)
     ans = num**3
-    for y in range(1, num):
+    for y in range(1, num + 1):
         num_x = y
         num_z = N // y - num
         ans += (num_x - 1) * num_z * 6 + num_z * 3
