import qualified Data.ByteString.Char8 as BC
import Data.Maybe (fromJust)
import Data.List
     
main = BC.getContents >>= print . solve . map (fst . fromJust . BC.readInt) . BC.words
     
solve (n:as) = sum [(reverse (drop n (sort as))) !! (2 * i - 1) | i <- [1..n]]