object Main extends App {
  val sc = new java.util.Scanner(System.in)
  var i = 0
  var value = 0
  do {
      i = i + 1
      value = sc.nextInt
      if(value != 0) println(s"Case $i: $value")
  }while(value != 0)

}
