import scala.util.control.Breaks
object Main extends App {
  val b = new Breaks
  b.breakable {
    for (i <- 1 to 10000) {
      val n = readLine().toInt
      if (n != 0)
        println("Case %d: %d".format(i, n))
      else
        b.break
    }
  }
}
