import Control.Applicative

main :: IO ()
main = do  
 num <- read <$> getLine :: IO Int
 putStrLn $ toDispTime num



toDispTime :: Int -> String
toDispTime a = show hour ++ ":" ++ show minute ++ ":" ++ show second
 where  
    hour = a `div` 3600
    minute = (a `mod` 3600) `div` 60 
    second = a `mod` 60
