import Data.List
main = do
 n <- read <$> getLine :: IO Int
 dList <- sort . map read . words <$> getLine :: IO [Int]
 let al = dList !! (n `div` 2 - 1)
 let ar = dList !! (n `div` 2) 
 print $ ar - al