import Control.Applicative
import Control.Monad
import Data.List
import Text.Printf

main :: IO ()
main = go 1

go :: Int -> IO ()
go i = do
  x <- readLn :: IO Int
  when (x /= 0) $ do
    printf "Case %d: %d\n" i x
    go (i + 1)

