import qualified Control.Monad as Monad

main = loop 1

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