i=1

while 1:

 a=eval(input())

 if int(a)==0:break

 print(f'Case {i}: {a}')

 i+=1
import sys

i=1

for a in sys.stdin:

 if a=='0\n':break

 print(f'Case {i}: {a.strip()}')

 i+=1
i = 1
while 1:
    a = eval(input())
    if int(a) == 0:
        break
    print(f"Case {i}: {a}")
    i += 1

import sys

i = 1
for a in sys.stdin:
    if a == "0\n":
        break
    print(f"Case {i}: {a.strip()}")
    i += 1

+import sys + -while 1: -    a = eval(input()) -    if int(a) == 0: +for a in sys.stdin: +    if a == "0\n": -    print(f"Case {i}: {a}") +    print(f"Case {i}: {a.strip()}")