import Control.Applicative ((<$>), (<*>), (<*), (*>), (<$))
import Control.Monad
import Data.List

main :: IO ()
main = do
  n <- getl read
  solve n <$> getl (map read . words) >>= print

solve :: Int -> [Integer] -> Integer
solve n xs = f 0 ys
  where
    ys = take (n * 2) $ sortBy (flip compare) xs
    f acc (x:y:zs) = f (acc + y) zs
    f acc _ = acc
    
getl :: (String -> a) -> IO a
getl f = f <$> getLine
