let x = require('fs').readFileSync('/dev/stdin', 'UTF-8');
x = parseInt(x);


let surplus1 = x%3600;
let hour = (x-surplus1)/3600;
var surplus2 = surplus1%60;
let minite = (surplus1-surplus2)/60;

let second = surplus2;

console.log(hour + ":" + minite + ":" + second);

