405248: GYM101856 L Lazy ERCD

Memory Limit:1024 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

L. Lazy ERCDtime limit per test1 secondmemory limit per test1024 megabytesinputlazy.inoutputstandard output

FIFA changed the style of the World Cup. There are no group rounds anymore, therefore the World Cup will be a pure knockout competition. In a knockout competition, each match that is played between two teams, the losing team is knocked-out of the competition and will not play again, until there's exactly one winner (we are not concerned about other positions, only the first place).

Having N teams in the World Cup, our ERCD wants to know how many matches he needs to watch (he will really watch all matches). He is lazy to count that number, so he needs you to write a program that calculates it.

Input

The first line of the input contains a single integer 1 ≤ T ≤ 100 the number of test cases. Each test case consists of 1 line, containing a single integer N, the number of teams; where 1 ≤ N ≤ 100.

Output

For each test case output a single line displaying the case number, followed by the number of matches the ERCD will watch.

ExampleInput
3
2
87
4
Output
Case 1: 1
Case 2: 86
Case 3: 3

加入题单

上一题 下一题 算法标签: