import           Control.Applicative

data HMS = HMS { h :: Int, m :: Int, s :: Int }

instance Show HMS where
  show o = show (h o) ++ ":" ++ show (m o) ++ ":" ++ show (s o)

toHMS n = HMS h m s
  where h = div n 3600
        m = div n 60 - h * 60
        s = mod n 60

main = do
  n <- readLn
  putStrLn $ show $ toHMS n

