import Control.Monad.State

main :: IO ()
main = do
  (`evalStateT` 1) $ fix $ \loop -> do
      i <- lift $ getLine
      n <- get
      unless (i == "0") $ do 
        lift $ putStrLn $ "Case " ++ show n ++ ": " ++ i
        modify (+1)
        loop
  return ()
