var fs = require('fs')
var contents = fs.readFileSync('/dev/stdin', 'utf-8');

var watch = function(str) {
    var n = parseInt(str);
    var h = Math.floor(n / 3600);
    var m = Math.floor((n - 3600 * h) / 60);
    var s = n % 60;
    return h + ":" + m + ":" + s;
}

console.log(watch(contents));