import java.util.*;

public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

        return;
    }
} 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[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

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

        int n = sc.nextInt();

        int[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

        return;
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] p = new int[100002]; p new int[100002] 100002 for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        } int i = 0 ; int i = 0 ; i 0 i < p.length i p.length p p.length i++ i++ i {
            p[i] = 0;
        } {
            p[i] = 0;
        } p[i] = 0 p[i] p i 0 for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int d = sc.nextInt();
            p[d + 1]++;
        } {
            int d = sc.nextInt();
            p[d + 1]++;
        } int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc p[d + 1]++ p[d + 1] p d + 1 d 1 int ans = 0; ans 0 int sum = 0; sum 0 for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        } int i = 0; int i = 0; i 0 i < p.length i p.length p p.length i++ i++ i {
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        } {
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        } if(sum + p[i] == n / 2){
                ans++;
            } sum + p[i] == n / 2 sum + p[i] sum p[i] p i n / 2 n 2 {
                ans++;
            } ans++ ans sum += p[i] sum p[i] p i System.out.println(ans) System.out.println System.out System System.out ans return; String[] args args public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

        return;
    }
} public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

        return;
    }
} Main
import java.util.*;

public class Main {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] p = new int[100002];

        for(int i = 0 ; i < p.length; i++){
            p[i] = 0;
        }

        for(int i = 0; i < n; i++){
            int d = sc.nextInt();
            p[d + 1]++;
        }

        int ans = 0;
        int sum = 0;
        for(int i = 0; i < p.length; i++){
            if(sum + p[i] == n / 2){
                ans++;
            }
            sum += p[i];
        }


        System.out.println(ans);

        return;
    }
}
