{-# LANGUAGE BangPatterns #-}

import qualified Data.ByteString.Char8 as B
import           Data.Char
import qualified Data.IntMap           as M
import           Data.List
import qualified Data.Sequence         as C

main :: IO ()
main = do
    n <- readLn
    as <- unfoldr (B.readInt . B.dropWhile isSpace) <$> B.getLine
    print $ solve n as

solve :: Int -> [Int] -> Int
solve n = median . foldl' f M.empty . zip counts
    where
        counts = zipWith min [1,3..] [(2*n),(2*n-2)..]
        f mp (count, x) = M.insertWith (+) x count mp

median :: M.IntMap Int -> Int
median xs = go ((M.foldr (+) 0 xs) `div` 2) xs
    where
        go !h xs = let ((k, v), ys) = M.deleteFindMin xs
                   in if v > h then k else go (h-v) ys
