"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.main = (_N, dList) => {
    const sortedDList = [...dList].sort();
    if (sortedDList.length % 2 !== 0)
        return 0;
    const half = sortedDList.length / 2;
    return sortedDList[half] - sortedDList[half - 1];
};
const exec = () => {
    const input = require('fs').readFileSync('/dev/stdin', 'UTF-8');
    const [N, D] = input.split('\n');
    const dList = D.split(' ').map(d => Number(d));
    const res = exports.main(Number(N), dList);
    console.log(res);
};
exec();
