405247: GYM101856 K Katryoshka
Description
The Egyptian football team will be in Russia for the World Cup, of course they all would like to buy souvenirs for their families. Luckily they met the king of souvenirs of the famous Russian souvenir Matryoshka; the king makes his masterpiece Katryoshka using different kinds of pieces: wooden eyes, wooden mouths, and wooden bodies. He can form a nice Katryoshka using one of the following ways:
- Two eyes and a body.
- Two eyes, mouth and a body.
- Eye, mouth and a body.
The first line of the input contains a single integer 1 ≤ T ≤ 100 the number of test cases. Each test case consists of a single line containing 3 space separated integers 'n m k' the number of eyes, mouths and bodies respectively; where 0 ≤ n, m, k ≤ 108.
OutputFor each test case output a line displaying the case number and a single integer which is the largest number of nice Katryoshka pieces.
ExampleInput4Output
1 2 3
0 11 2
14 21 23
90 24 89
Case 1: 1
Case 2: 0
Case 3: 14
Case 4: 57