import Control.Monad

main :: IO ()
main = do
  rs <- liftM read getLine
  let h = rs `div` 3600
  let m = (rs - (h * 3600)) `div` 60
  let s = rs - (h * 3600) - (m * 60)
  putStr (show h)
  putStr  ":"
  putStr (show m)
  putStr ":"
  putStrLn (show s)