num = gets.to_i

if num >= 3600
  h = num/3600
  m = num - h*3600
  m2 = m/60
  s = m - m2*60
  puts "#{h}:#{m2}:#{s}"
elsif 3600 > num && num >= 60
  m = num/60
  s = num - m*60
  puts "0:#{m}:#{s}"
else
  puts "0:0:#{num}"
end

