Problem Statement

Given two non-negative integers 'x' and 'y', you need to count the total number of set bits in the binary representation of all the integers between 'x' and 'y' (both inclusive).

Input

The input file can contain upto 3000 lines. Each line contains two integers 'x' and 'y'. Input is terminated by a line containing two zeros. This line should not be processed.

Output

Each line of input should produce one line of output of the form 'Case A: B' (quotes for clarity) where A is the serial of output and B denotes the total number of set bits.

Constraints

0 <= x <= y <= 2000000000

Sample Input

5 10
20 30
0 0

Sample Output

Case 1: 12
Case 2: 35

Explanation

For the first test case, 5 to 10 can be represented as 101, 110, 111, 1000, 1001, 1010.So the total number of set bits = 2+2+3+1+2+2 = 12.

Rounak Tibrewal

Languages: C,C++,Java

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Mode Judge

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0