import Control.Applicative
main = do
  x <- read <$> getLine
  let s = x `mod` 60
      m = (x `div` 60) `mod` 60
      h = (x `div` 60) `div` 60
  putStrLn $ show h ++ ":" ++ show m ++ ":" ++ show s
