class GetSecond
  def self.hour_second(total_second, hour)
    second = total_second-hour*3600
  end
end

total_second = gets.to_i


hour = total_second/3600.floor
minute = GetSecond.hour_second(total_second, hour).to_i/60.floor
second = GetSecond.hour_second(total_second, hour).to_i%60

puts "#{hour}:#{minute}:#{second}"