import Data.List
import Data.Char
import qualified Data.ByteString.Char8 as BS8

main :: IO ()
main = do
    n <- readLn
    d <- unfoldr (BS8.readInt . BS8.dropWhile isSpace) <$> BS8.getLine
    let sd = sort d
    
    print $ (sd !! (n `div` 2)) - sd !! (n `div` 2 - 1)
