(* your code goes here *)
let id x = x

let () =
    let x = Scanf.sscanf(read_line()) "%d" id in
    let rec f t r n = if r >= t then f t (r - t) (n + 1) else (n, r) in
    let (hh, x') = f 3600 x 0  in
    let (mm, ss) = f 60   x' 0 in
    Printf.printf "%d:%d:%d\n" hh mm ss
