i=1

x=int(eval(input()))

while x!=0:

    print(("Case {}: {}".format(i,x)))

    i+=1

    x=int(eval(input()))
import sys

i=1

for l in sys.stdin:

    x=l.rstrip('\r\n')

    if x=="0":break

    print(("Case {}: {}".format(i,x)))

    i+=1
i = 1
x = int(eval(input()))
while x != 0:
    print(("Case {}: {}".format(i, x)))
    i += 1
    x = int(eval(input()))

import sys

i = 1
for l in sys.stdin:
    x = l.rstrip("\r\n")
    if x == "0":
        break
    print(("Case {}: {}".format(i, x)))
    i += 1

+import sys + -x = int(eval(input())) -while x != 0: +for l in sys.stdin: +    x = l.rstrip("\r\n") +    if x == "0": +        break -    x = int(eval(input()))