format_sec :: Integer -> String
format_sec s = formatted_s
    where
        hours = s `div` 3600
        minutes = s `div` 60 `mod` 60
        seconds = s `mod` 60
        formatted_s = (show hours) ++ ":" ++ (show minutes) ++ ":" ++ (show seconds)

main = do
    givenstr <- getLine
    putStrLn((format_sec . read) givenstr)