sec = $stdin.gets.to_i

HOUR_SEC = 3600

hour = 0
while sec >= HOUR_SEC do
  hour += 1
  sec -= HOUR_SEC
end

MIN_SEC = 60

min = 0
while sec >= MIN_SEC do
  min += 1
  sec -= MIN_SEC
end

puts "#{hour}:#{min}:#{sec}"