mm = gets.chomp.to_i / 10 * 6
h = mm / 60
m = mm % 60
puts "#{10 + h}:#{m.to_s.rjust(2,"0")}"