main = do
    n <- getInt
    printTime $ toTime n
    putStrLn ""

getInt :: IO (Int)
getInt = do
    str <- getLine
    return $ read str

printTime :: (Int, Int, Int)-> IO ()
printTime (h, m, s) = putStr $ show h ++ ':':show m ++ ':':show s

toTime :: Int -> (Int, Int, Int)
toTime n = (h, m ,s)
    where
        h = n　`div ` (60 * 60)
        m = (n `div` 60) `mod` 60
        s = n `mod` 60
