main :: IO ()
main = do
    line <- getLine
    putStrLn $ toDateTime (read line :: Int)

toDateTime :: Int -> String
toDateTime n =
    let
        hour =  n `div` (60 * 60)
        min  = (n `mod` (60 * 60)) `div` 60
        sec  = (n `mod` (60 * 60)) `mod` 60
    in (show hour) ++ ":" ++ (show min) ++ ":" ++ (show sec)