Now imagine other pool-like games where you have a cue ball and x numbered balls. You’d like
to be able to rack up the x numbered balls in a triangle, and have all x+1 balls perfectly fill a
square m-by-m tray. For what values of x is this possible? In this problem you’ll be given an lower
bound a and upper bound b, and asked how many numbers within this range have the above
property.
Input
Input for each test case will one line containing two integers a b, where 0 < a < b ≤ 109.
The line 0 0 will follow the last test case.
Output
For each test case one line of output as follows: Case n: k
if there are k integers x such that a < x+1 < b, x balls can be racked up in a triangle, and x+1 balls
fill a square tray.