import Control.Applicative
    
solve :: Int -> Int

solve
    = id

output :: Int -> Int -> String

output i x
    = "Case " ++ show i ++ ": " ++ show x

loop :: Int -> IO ()
    
loop i
    = do
        input <- read <$> getLine
        case solve input of
            0
                -> return ()
                
            x
                -> do
                    putStrLn $ output i x
                    loop $ i + 1
                    
main :: IO ()
    
main
    = loop 1