process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  var input = chunk.trim();
  var hour = Math.floor(input / (60 * 60));
  var minute = Math.floor(input / 60) % 60;
  var second = input % 60
  console.log(hour + ':' + minute + ':' + second);
});