#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
   
if __FILE__ == $0
  while line = STDIN.gets
    tokens = line.chomp!.split.map!(&:to_i)
    sec = tokens[0]
    h = (sec/3600).to_i
    m = ((sec - h*3600)/60).to_i
    s = sec % 60
   
   
    puts "#{h}:#{m}:#{s}"
  end
end