import java.util.Scanner;


	public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    }
		
	}
	 import java.util.Scanner; Scanner java.util public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    }
		
	} Main public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    } main {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long[] d = new long[100001]; d new long[100001] 100001 for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				int val = sc.nextInt();
				d[val]++;
			} {
				int val = sc.nextInt();
				d[val]++;
			} int val = sc.nextInt(); val sc.nextInt() sc.nextInt sc d[val]++ d[val] d val int ret = 0; ret 0 long sum = 0; sum 0 for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			} int i=0; int i=0; i 0 sum<=n/2 sum n/2 n 2 i++ i++ i {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			} {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			} sum += d[i] sum d[i] d i if(sum==n/2) {
					ret++;
				} sum==n/2 sum n/2 n 2 {
					ret++;
				} ret++ ret System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    }
		
	} public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    }
		
	} Main
import java.util.Scanner;


	public class Main {
		
		public static void main(String[] args) {

			Scanner sc = new Scanner(System.in);
			
			int n = sc.nextInt();
			long[] d = new long[100001];
			
			
			for(int i=0;i<n;i++) {
				int val = sc.nextInt();
				d[val]++;
			}
			
			int ret = 0;
			long sum = 0;
			
			for(int i=0;sum<=n/2;i++) {
				sum += d[i];
				if(sum==n/2) {
					ret++;
				}
			}
			
			System.out.println(ret);
			
			
	    }
		
	}
	
