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

solve :: Int -> [Int] -> Int
solve n xs = median $ go 0 (n-1) xs
    where
        go a b [] = []
        go 0 b (x:xs) = x : go 1 (b-1) xs
        go a b (x:xs)
            | a < b     = replicate (2 * a) x ++ go (a+1) (b-1) xs
            | otherwise = replicate (2 * b + 1) x ++ go (a+1) (b-1) xs

median :: [Int] -> Int
median xs = let ys = C.unstableSort $ C.fromList xs
            in ys `C.index` ((C.length ys) `div` 2)