var readable = process.stdin;
readable.resume();
readable.setEncoding( 'utf-8' );
readable.on( 'data', function( chunk ) {
  var data = parseInt( chunk );
  var h = Math.floor( data/3600 );
  data = data%3600;
  var m = Math.floor( data/60 );
  var s = Math.floor( data%60 );  
  console.log( h+':'+m+':'+s );
} )