input = gets.to_i

def hhmmss(i)
  hh = (i/60/60).to_i
  mm = (i-hh*60*60)/60.to_i
  ss = (i-(hh*60*60+mm*60)).to_i
  puts "#{hh}:#{mm}:#{ss}"
end

if 0 <= input && input < 86400 
  hhmmss(input)
else
  return false
end

