divMod' :: Int -> Int -> (Int, Int)
divMod' a b = let quotient = div a b
                  surplus = a `mod` b
              in (quotient, surplus)
       
hours :: Int -> (Int, Int)
hours a = divMod' a 3600

minutes :: Int -> (Int, Int)
minutes a = divMod' a 60

main = do
    numString <- getLine
    let num = read numString
        (hQuo, hSur) = hours num
        (mQuo, mSur) = minutes hSur
        seconds = mSur
    putStrLn $ show hQuo ++ ":" ++ show mQuo ++ ":" ++ show seconds



