function main() {
let num = input[0],
    h = 0,
    m = 0,
    s = 0;

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

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

s = num;

console.log(h + ':' + m + ':' + s);
}
 
var input = "";
 
process.stdin.resume();
process.stdin.setEncoding("utf-8");
process.stdin.on("data", function(chunk) {
    input += chunk;
});
 
process.stdin.on("end", function() {
    input = input.split("\n");
    main();