
import Data.List

hoge :: [Int] -> Int
hoge [] = 0
hoge ints = bar $ sort ints
  where
    bar ls
      | length ls `mod` 2 == 0 = ls!!(length ls `div` 2) - ls!!(length ls `div` 2 - 1)
      | otherwise = 0

main = do
  _ <- getLine
  ints <- map read . words <$> getLine :: IO [Int]
  print $ hoge ints

