import java.io.InputStream;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    }

    public int div(int n, int[] arr){
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    }
} import java.io.InputStream; InputStream java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    }

    public int div(int n, int[] arr){
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            arr[i] = sc.nextInt();
        } {
            arr[i] = sc.nextInt();
        } arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc Main S = new Main(); S new Main() System.out.println(S.div(n, arr)) System.out.println System.out System System.out S.div(n, arr) S.div S n arr String[] args args public int div(int n, int[] arr){
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    } div {
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    } Arrays.sort(arr) Arrays.sort Arrays arr if (n==0) return 0; n==0 n 0 return 0; 0 if (n%2==1) return 0; n%2==1 n%2 n 2 1 return 0; 0 int middle = n/2 - 1; middle n/2 - 1 n/2 n 2 1 if (arr[middle] == arr[middle+1]){
            return 0;
        } arr[middle] == arr[middle+1] arr[middle] arr middle arr[middle+1] arr middle+1 middle 1 {
            return 0;
        } return 0; 0 return arr[middle+1] - arr[middle]; arr[middle+1] - arr[middle] arr[middle+1] arr middle+1 middle 1 arr[middle] arr middle int n n int[] arr arr public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    }

    public int div(int n, int[] arr){
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    }

    public int div(int n, int[] arr){
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    }
} Main
import java.io.InputStream;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        Main S = new Main();

        System.out.println(S.div(n, arr));;
    }

    public int div(int n, int[] arr){
        Arrays.sort(arr);
        if (n==0) return 0;
        if (n%2==1) return 0;
        int middle = n/2 - 1;
        if (arr[middle] == arr[middle+1]){
            return 0;
        }

        return arr[middle+1] - arr[middle];
    }
}
