import Text.Printf

main :: IO()
main = do
  input <- readLn
  let [s,m,h] = toTime input [60, 60]
  printf "%d:%d:%d\n" h m s

toTime :: Int -> [Int] -> [Int]
toTime s [] =[s]
toTime s units = let u:us = units
               in (s `mod` u) : toTime (s `div` u) us