import scala.io.StdIn.readInt

object Main{
  def main(args: Array[String]): Unit = {
    var c = 0
    var ok = true
    do {
      val i = readInt
      ok = i != 0
      if(ok) {
        c = c + 1
        printf("Case %d: %d\n", c, i)
      }
    } while(ok)
  }
}