In the game show “The Price is Right”, a number of players (typically 4) compete to get on stage by guessing the price of an item. The winner is the person whose guess is the closest one not exceeding the actual price. Because of the popularity of the one-person game show “Who Wants to be a Millionaire”, the American Contest Management (ACM) would like to introduce a one-person version of “The Price is Right”.
In this version, each contestant is allowed $G$ ($1 \le G \le 30$) guesses and $L$ ($0 \le L \le 30$) lifelines. The contestant makes a number of guesses for the actual price. After each guess, the contestant is told whether it is correct, too low, or too high. If the guess is correct, the contestant wins. Otherwise, the guess is used up. Additionally, if the guess is too high, a lifeline is also lost. The contestant loses when all guesses are used up, or if a guess is too high and no lifelines remain. All prices are positive integers.
It turns out that for a particular pair of values $G$ and $L$, there is a guessing strategy such that if the price is between $1$ and $N$ (inclusive) for some $N$, the player can guarantee a win. The organizers do not want every contestant to win, so the actual price must exceed $N$; at the same time the game should not be so hard that too few contestants win. Given $G$ and $L$, what is the largest value of $N$ such that a strategy exists to win whenever the price is between $1$ and $N$ (inclusive)?
The input consists of several cases. Each case is a single line containing two integers $G$ and $L$ separated by one space. The end of input is a line with $G = L = 0$, which must not be processed.
For each case, print one line of the form:
Case c: N
where $c$ is the case number (starting from $1$) and $N$ is the computed value.