There are multiple test cases, terminated by a line "0".
For each test case, the first line contains an integer n (1<=n<=10^5), the next line contains n integers ai (0<=ai<=2048).
4
1024 512 256 256
4
1024 1024 1024 1024
5
1024 512 512 512 1
0
Case #1: 1
Case #2: 11
Case #3: 8