import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] p = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    }
} 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();
        int[] p = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] p = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] p = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    } 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[n]; p new int[n] n for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            p[i] = sc.nextInt();
        } {
            p[i] = sc.nextInt();
        } p[i] = sc.nextInt() p[i] p i sc.nextInt() sc.nextInt sc int s = 0; s 0 int lo = p[0] + 1; lo p[0] + 1 p[0] p 0 1 for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        } {
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        } if(lo >= p[i]){
                lo = p[i];
                s++;
            } lo >= p[i] lo p[i] p i {
                lo = p[i];
                s++;
            } lo = p[i] lo p[i] p i s++ s System.out.println(s) System.out.println System.out System System.out s sc.close() sc.close sc 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[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] p = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] p = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            p[i] = sc.nextInt();
        }
        int s = 0;
        int lo = p[0] + 1;
        for(int i = 0 ; i < n ; i++ ){
            if(lo >= p[i]){
                lo = p[i];
                s++;
            }
        }
        System.out.println(s);
        sc.close();
    }
}