{-# LANGUAGE ScopedTypeVariables #-}

import           Control.Applicative
import           Text.Printf

main :: IO ()
main = solve 1

solve :: Int -> IO ()
solve count = do
  x :: Int <- readLn
  if x == 0
    then pure ()
    else do
    printf "Case %d: %d\n" count x
    solve (count+1)


