import qualified Data.List as List

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

solve n xs =
  let
    xs' = drop n $ List.sort xs
    makePair [] = []
    makePair (x:y:xs) = min x y : makePair xs
  in
    sum $ makePair xs'