diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -2,7 +2,7 @@
 
 n, m, k = (int(x) for x in input().split())
 l = math.lcm(n, m)
-low, high = 0, 10**8
+low, high = 0, 10**18
 while high - low > 1:
     mid = (low + high) // 2
     if mid // n + mid // m - 2 * (mid // l) < k:
