process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', function (chunk) {
    let h, m, rest = new Number();
    h = parseInt(chunk / 3600);
    rest = parseInt(chunk % 3600);
    m = parseInt(rest / 60);
    rest = parseInt(rest % 60);
    console.log(`${h}:${m}:${rest}`);
});
