process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (input) {
  const args = input.split(" ").map(Number);
  
  let input = args[0],
        h = 0,
        m = 0,
        s = 0;

    while (input >= 3600) {
        input -= 3600;
        h++;
    }

    while (input >= 60) {
        input -= 60;
        m++;
    }

    s = input;

    console.log(h + ':' + m + ':' + s);
});