import qualified Control.Monad as Monad

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