let content = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', buf => { content += buf; });
process.stdin.on('end', () => {
  const { hour, minute, sec } = parseTime(parseInt(content, 10));
  console.log([hour, minute, sec].join(':'));
});


const SEC_IN_HOUR = 60 * 60;
const parseTime = time => {
  const hour = Math.floor(time / SEC_IN_HOUR);
  const minute = Math.floor(time % SEC_IN_HOUR / 60);
  const sec = time % 60;
  return { hour, minute, sec };
};
