process.stdin.resume()
process.stdin.setEncoding('utf8')
process.stdin.on('data', function (chunk) {
  const hour = Math.floor(chunk / 3600)
  const minute = Math.floor((chunk % 3600) / 60)
  const second = chunk % 60
  const output = [ hour, minute, second ].join(':')
  console.log(output)
})