import java.util.Arrays;
import java.util.Scanner;
public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));
	
	public static void main(String[] args) {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));
	
	public static void main(String[] args) {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	}
} Main static Scanner scan=new Scanner(System.in); scan new Scanner(System.in) static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;} gcd {return b>0?gcd(b,a%b):a;} return b>0?gcd(b,a%b):a; b>0?gcd(b,a%b):a b>0 b 0 gcd(b,a%b) gcd b a%b a b a int a a int b b static long lcm (int a, int b) {return a*b/gcd(a,b);} lcm {return a*b/gcd(a,b);} return a*b/gcd(a,b); a*b/gcd(a,b) a*b a b gcd(a,b) gcd a b int a a int b b static int max(int a,int b) {return a>b?a:b;} max {return a>b?a:b;} return a>b?a:b; a>b?a:b a>b a b a b int a a int b b static int min(int a,int b) {return a<b?a:b;} min {return a<b?a:b;} return a<b?a:b; a<b?a:b a<b a b a b int a a int b b static long factorial(int i) {return i==1?1:i*factorial(i-1);} factorial {return i==1?1:i*factorial(i-1);} return i==1?1:i*factorial(i-1); i==1?1:i*factorial(i-1) i==1 i 1 1 i*factorial(i-1) i factorial(i-1) factorial i-1 i 1 int i i static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		} lower_bound {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		} int low=0 low 0 high=a.length; high a.length a a.length while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		} low<high low high {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		} int mid=((high-low)/2)+low; mid ((high-low)/2)+low ((high-low)/2) (high-low) high low 2 low if(a[mid]<=key)low=mid+1;
			else high=mid; a[mid]<=key a[mid] a mid key low=mid+1 low mid+1 mid 1 high=mid high mid return high; high int a[] a int key key static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		} upper_bound {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		} int low=0 low 0 high=a.length; high a.length a a.length while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		} low<high low high {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		} int mid=((high-low)/2)+low; mid ((high-low)/2)+low ((high-low)/2) (high-low) high low 2 low if(a[mid]<key)low=mid+1;
			else high=mid; a[mid]<key a[mid] a mid key low=mid+1 low mid+1 mid 1 high=mid high mid return high; high int a[] a int key key static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	} isPrime {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	} if (n==2) return true; n==2 n 2 return true; true if (n<2 || n%2==0) return false; n<2 || n%2==0 n<2 n 2 n%2==0 n%2 n 2 0 return false; false double d = Math.sqrt(n); d Math.sqrt(n) Math.sqrt Math n for (int i=3; i<=d; i+=2)if(n%i==0){return false;} int i=3; int i=3; i 3 i<=d i d i+=2 i+=2 i 2 if(n%i==0){return false;} if(n%i==0){return false;} n%i==0 n%i n i 0 {return false;} return false; false return true; true int n n static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	} upper_division {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	} if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		} a%b==0 a%b a b 0 {
			return a/b;
		} return a/b; a/b a b {
			return a/b+1;
		} return a/b+1; a/b+1 a/b a b 1 int a a int b b static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	} lupper_division {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	} if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		} a%b==0 a%b a b 0 {
			return a/b;
		} return a/b; a/b a b {
			return a/b+1;
		} return a/b+1; a/b+1 a/b a b 1 long a a long b b static long lmax(long a,long b) {return Math.max(a, b);} lmax {return Math.max(a, b);} return Math.max(a, b); Math.max(a, b) Math.max Math a b long a a long b b static long lmin(long a,long b) {return Math.min(a, b);} lmin {return Math.min(a, b);} return Math.min(a, b); Math.min(a, b) Math.min Math a b long a a long b b static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	} setArray {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	} int b[]=new int[a]; b new int[a] a for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			b[i]=scan.nextInt();
		} {
			b[i]=scan.nextInt();
		} b[i]=scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan return b; b int a a public static void main(String[] args) {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	} main {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	} int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int b[]=setArray(a); b setArray(a) setArray a Arrays.sort(b) Arrays.sort Arrays b System.out.println(b[a/2]-b[a/2-1]) System.out.println System.out System System.out b[a/2]-b[a/2-1] b[a/2] b a/2 a 2 b[a/2-1] b a/2-1 a/2 a 2 1 String[] args args public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));
	
	public static void main(String[] args) {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	}
} public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));
	
	public static void main(String[] args) {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));
	
	public static void main(String[] args) {
		int a=scan.nextInt();
		int b[]=setArray(a);
		Arrays.sort(b);
		System.out.println(b[a/2]-b[a/2-1]);
	}
}