i = 1

while True:

  x = int(eval(input()))

  if x == 0: break

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

  i+=1

i = 1

while True:

  x = int(eval(input()))

  if not x: break

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

  i+=1

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

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

-    if x == 0: +    if not x: