'use strict';
(function(stdin) { 
  var inputs = stdin.toString();
  (function(S) {
    //????????????????????????
    console.log(h = S / (60 * 60) : m = S % (60 * 60) / 60 : s = S % 60);
  }(parseInt(inputs.trim(),10))); //????°??????????????¶?????????°?????????
}(require('fs').readFileSync('/dev/stdin', 'utf8')));