var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  let s = Number.parseInt(lines[0]);
  let h = 0, m = 0;
  
  while (s > 3599) {
    s -= 3600;
    h++;
  }
  
  while (s > 59) {
    s -= 60;
    m++;
  }
  
  console.log(h + ':' + m + ':' + s);
});
