while str = $stdin.gets
  sec = str.strip.to_i
  h = (sec / 3600).floor
#  puts "h = #{h}"
  sec -= h * 3600
  m = (sec / 60).floor
#  puts "m = #{m}"
  sec -= m * 60
#  puts "sec = #{sec}"

  puts "#{h}:#{m}:#{sec}"
end