function Main(input) {
  input = input.trim()
  input = input.split("\n");
  var S = input[1].split(" ");
  S.sort();
  console.log(S[input[0]/2+1]-S[input[0]/2])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));