import scala.io.StdIn.readInt

object Main extends App {

  val xs = Iterator.continually(readInt()).takeWhile { _ != 0 }

  val results = xs.zipWithIndex.map {
    case (x, i) => s"Case ${i + 1}: $x"
  }

  results.foreach(println)
}

