import Text.Printf
main :: IO()
main = do
  output 1

output :: Int -> IO()
output lnum = do
    input <- readLn :: IO Int
    if input == 0
    then return()
    else do
      printf "Case %d: %d\n" lnum input
      output(lnum+1)