import java.io.*;
import java.util.*;

public class Main {
    PrintWriter out = new PrintWriter(System.out);
    long mod = 1000000000+7;
    public static void main(String[] args) throws Exception {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    }
    long solve(){
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    }
}
 import java.io.*; io.* java import java.util.*; util.* java public class Main {
    PrintWriter out = new PrintWriter(System.out);
    long mod = 1000000000+7;
    public static void main(String[] args) throws Exception {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    }
    long solve(){
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    }
} Main PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) long mod = 1000000000+7; mod 1000000000+7 1000000000 7 public static void main(String[] args) throws Exception {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    } main {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    } Main main = new Main(); main new Main() System.out.println(main.solve()) System.out.println System.out System System.out main.solve() main.solve main String[] args args long solve(){
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    } solve {
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int maxD = 100000; maxD 100000 int[] cnt = new int[maxD+1]; cnt new int[maxD+1] maxD+1 maxD 1 for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int d = sc.nextInt();
            cnt[d] += 1;
        } {
            int d = sc.nextInt();
            cnt[d] += 1;
        } int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc cnt[d] += 1 cnt[d] cnt d 1 int smaller = 0 smaller 0 ans = 0; ans 0 for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        } int i=1; int i=1; i 1 i<=maxD i maxD i++ i++ i {
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        } {
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        } smaller += cnt[i-1] smaller cnt[i-1] cnt i-1 i 1 if(smaller*2==n) ans += 1; smaller*2==n smaller*2 smaller 2 n ans += 1 ans 1 return ans; ans public class Main {
    PrintWriter out = new PrintWriter(System.out);
    long mod = 1000000000+7;
    public static void main(String[] args) throws Exception {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    }
    long solve(){
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    }
} public class Main {
    PrintWriter out = new PrintWriter(System.out);
    long mod = 1000000000+7;
    public static void main(String[] args) throws Exception {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    }
    long solve(){
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    PrintWriter out = new PrintWriter(System.out);
    long mod = 1000000000+7;
    public static void main(String[] args) throws Exception {
        Main main = new Main();
//        main.solve();
        System.out.println(main.solve());
    }
    long solve(){
        // it's all about implementation
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int maxD = 100000;
        int[] cnt = new int[maxD+1];
        for(int i=0;i<n;i++){
            int d = sc.nextInt();
            cnt[d] += 1;
        }
        int smaller = 0, ans = 0;
        for(int i=1;i<=maxD;i++){
            smaller += cnt[i-1];
            if(smaller*2==n) ans += 1;
        }
        return ans;
    }
}

