Milk Pail Python USACO Guide solution

I don’t understand what the “1001” is for in these lines of code:

for x in range(1001):
if (buck1 * x) > buck3:
break
for y in range(1001):
current = (buck1 * x) + (buck2 * y)
if current > buck3:
break
ans = max(ans, current)

1000 is the maximum value of M.