import Data.List

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

solve :: Int -> [Int] -> Int
solve n as = sum [as' !! i | i <- [n .. (2*n-1)]]
    where as' = sortBy (flip compare) as
