solve :: Int -> String
solve x = (show hour) ++ ":" ++ (show min) ++ ":" ++ (show sec)
    where hour = div (div x 60) 60
          min = mod (div x 60) 60
          sec = mod x 60

main = do
    getLine >>= putStrLn.solve.read