MODE = "stdio"

line = Array.new

if(defined? MODE)
  line = STDIN.read.split("\n")
else
  tmp = "\
  3
  5
  11
  7
  8
  19
  0
  ".split("\n")
  tmp.each{|s|
    line << s.strip
  }
end

i=1
line.each do |n|
  if n=="0"
    break
  end
  puts "Case #{i}: #{n}"
  i += 1
end