counter = 1

while True:

    x = int(eval(input()))

    if x == 0 :

        break

    else :

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

        counter = counter + 1

        

ans = []

for i, x in enumerate(open(0).readlines()):

    ans.append("Case %d: %s" % (i+1, x))

open(1,'w').writelines(ans[:-1])

counter = 1
while True:
    x = int(eval(input()))
    if x == 0:
        break
    else:
        print(("Case {}: {}".format(counter, x)))
        counter = counter + 1

ans = []
for i, x in enumerate(open(0).readlines()):
    ans.append("Case %d: %s" % (i + 1, x))
open(1, "w").writelines(ans[:-1])

-counter = 1 -while True: -    x = int(eval(input())) -    if x == 0: -        break -    else: -        print(("Case {}: {}".format(counter, x))) -        counter = counter + 1 +ans = [] +for i, x in enumerate(open(0).readlines()): +    ans.append("Case %d: %s" % (i + 1, x)) +open(1, "w").writelines(ans[:-1])