i = 1

while 1:

	x = eval(input())

	if x == 0:

		break

	print('Case %d: %d' % (i, x))

	i+=1
i = 1

while 1:

	x = input()

	if x == '0':

		break

	print('Case %d: %s' % (i, x))

	i+=1
i = 1
while 1:
    x = eval(input())
    if x == 0:
        break
    print("Case %d: %d" % (i, x))
    i += 1

i = 1
while 1:
    x = input()
    if x == "0":
        break
    print("Case %d: %s" % (i, x))
    i += 1

-    x = eval(input()) -    if x == 0: +    x = input() +    if x == "0": -    print("Case %d: %d" % (i, x)) +    print("Case %d: %s" % (i, x))