Camping

No attempts yetTime limit1sMemory limit128 MB

Problem

Mountaineer Kim Kangsan went camping with his family. However, the campsite had the following warning posted:

This campsite may only be used for 10 days out of any 20 consecutive days.

Kangsan has just started a 28-day vacation. During this vacation, at most how many days can Kangsan use the campsite?

Kangsan wants to solve a more general version of the problem. The campsite may be used for only $L$ days out of every $P$ consecutive days, and Kangsan's vacation lasts $V$ days. Find the maximum number of days Kangsan can use the campsite (where $1 < L < P < V$).

Input

The input consists of several test cases. Each test case is given on a single line containing three integers $L$, $P$, and $V$ in that order. All integers fit within the int range. The last line of the input contains 0 0 0, which must not be processed.

Output

For each test case, print the maximum number of days Kangsan can use the campsite, one per line, in the format Case x: y, where x is the test case number starting from 1 and y is the answer.