import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 1;
        int max = sc.nextInt();
        int min = 0;
        
        for(int i = 0;i < n-1;i++){
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        }
        
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 1;
        int max = sc.nextInt();
        int min = 0;
        
        for(int i = 0;i < n-1;i++){
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 1;
        int max = sc.nextInt();
        int min = 0;
        
        for(int i = 0;i < n-1;i++){
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        }
        
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 1;
        int max = sc.nextInt();
        int min = 0;
        
        for(int i = 0;i < n-1;i++){
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int ans = 1; ans 1 int max = sc.nextInt(); max sc.nextInt() sc.nextInt sc int min = 0; min 0 for(int i = 0;i < n-1;i++){
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        } int i = 0; int i = 0; i 0 i < n-1 i n-1 n 1 i++ i++ i {
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        } {
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        } int p = sc.nextInt(); p sc.nextInt() sc.nextInt sc if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            } i == 0 i 0 {
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            } min = p min p if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                } max < min max min {
                    int tmp = min;
                    min = max;
                    max = tmp;
                } int tmp = min; tmp min min = max min max max = tmp max tmp if(max >= p && min >= p){
                ans++;
            } max >= p && min >= p max >= p max p min >= p min p {
                ans++;
            } ans++ ans if(p > max)
                max = p; p > max p max max = p max p if(p < min)
                min = p; p < min p min min = p min p System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 1;
        int max = sc.nextInt();
        int min = 0;
        
        for(int i = 0;i < n-1;i++){
            int p = sc.nextInt();
            if(i == 0){
                min = p;
                if(max < min){
                    int tmp = min;
                    min = max;
                    max = tmp;
                }
            }

            if(max >= p && min >= p){
                ans++;
            }
            if(p > max)
                max = p;
            if(p < min)
                min = p;
        }
        
        System.out.println(ans);
    }
}