cnt = 1

while(True):

    x = int(input())

    if x == 0: break

    print("Case", cnt, end="")

    print(":", x)

    cnt += 1

for i in range(1, 10001):

    x = eval(input())

    if x == "0":

        break

    print(f"Case {i}: {x}")

cnt = 1
while True:
    x = int(input())
    if x == 0:
        break
    print("Case", cnt, end="")
    print(":", x)
    cnt += 1

for i in range(1, 10001):
    x = eval(input())
    if x == "0":
        break
    print(f"Case {i}: {x}")

-cnt = 1 -while True: -    x = int(input()) -    if x == 0: +for i in range(1, 10001): +    x = eval(input()) +    if x == "0": -    print("Case", cnt, end="") -    print(":", x) -    cnt += 1 +    print(f"Case {i}: {x}")