import scala.io.Source

object Main {
  def main(args:Array[String]) {
    for((line, index) <- scala.io.Source.stdin.getLines().zipWithIndex){
        line.toInt match {
          case 0 => return
          case _ => println("Case " +  (index + 1) + ": " + line)
        }
    }
  }
}