import Control.Applicative

main :: IO ()
main = do
  x <- read <$> getLine :: IO Int
  putStrLn (show (geth x) ++ ":" ++ show (getm x) ++ ":" ++ show (gets x))

geth :: Int -> Int
geth x = div x 3600

getm :: Int -> Int
getm x = mod (div x 60) 60

gets :: Int -> Int
gets x = mod x 60