import qualified Control.Monad as Monad

main = loopPutCase 1

loopPutCase :: Int -> IO ()
loopPutCase i = do
                x <- getLine
                Monad.when (read x /= 0) $ do
                                putStrLn $ "Case " ++ show i ++ ": " ++ x
                                loopPutCase $ i + 1
