import java.util.Scanner

import scala.collection.mutable.ListBuffer
import scala.util.control.Breaks

object Main {
  def main (args: Array[String]) = {
    val in = new Scanner(System.in)
    var list = new ListBuffer[Int]

    val brk = new Breaks
    brk.breakable {
      while (true) {
        val next = in.nextLine.toInt
        if (0 != next) list += next else brk.break()
      }
    }

    list.zipWithIndex.foreach{ v =>
      println("Case %d: %d" format(v._2 + 1, v._1))
    }
  }
}