import Control.Applicative

calcTime :: Int -> (Int, Int, Int)

calcTime t
    = (h, m, s) where
        h = t `div` 3600
        m = t `mod` 3600 `div` 60
        s = t `mod` 60
    
lineUp :: (Int, Int, Int) -> String

lineUp (h, m, s)
    = show h ++ ":" ++ show m ++ ":" ++ show s
    
solve :: Int -> (Int, Int, Int)

solve
    = calcTime

main :: IO ()
    
main
    = do
        input <- read <$> getLine
        putStrLn $ lineUp $ solve input