class Main
  def self.run
    read_input_and_print_test_case 0
  end

  private

  def self.read_input_and_print_test_case(pre_number)
    case_number = pre_number + 1
    x = read_input
    return if x == 0
    puts "Case #{case_number}: #{x}"
    read_input_and_print_test_case(case_number)
  end

  def self.read_input
    gets.to_i
  end
end

Main.run