process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk){
	var a = chunk.trim(),
	x = parseInt(a),
	d = new Date(x*1000),
	h = d.getHours(),
	m = d.getMinutes(),
	s = d.getSeconds();
	console.log([h, m, s].join(':'));
});