S = Number(require('fs').readFileSync('/dev/stdin').toString())
ary = [];
for (i = 0; i < 3; i++) {
	d = Math.pow(60, 2 - i)
	r = d * 60
	ary.push(Math.floor((S % r) / d))
}
console.log(ary.join(":"))