{-# LANGUAGE BangPatterns #-}

module Main where

import Data.Char
import Data.List
import Control.Monad
import Control.Applicative


readInt :: IO Int
readInt = read <$> (input `seq` input)
    where input = do
            !c <- getChar
            if isDigit c || c == '-'
                then (c :) <$> input
                else return []

main = f 1

f n = do
    i <- readInt
    if i == 0
        then return ()
        else do
            putStrLn $ "Case " ++ show n ++ ": " ++ show i
            f (n+1)
