import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    }
} 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 res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int res = 0; res 0 int mi = N+1; mi N+1 N 1 for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        } {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        } int P = sc.nextInt(); P sc.nextInt() sc.nextInt sc mi = Math.min(mi, P) mi Math.min(mi, P) Math.min Math mi P if(mi == P) {
                res++;
            } mi == P mi P {
                res++;
            } res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    }
} 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 res = 0;
        int mi = N+1;

        for(int i = 0; i < N; i++) {
            int P = sc.nextInt();
            mi = Math.min(mi, P);
            if(mi == P) {
                res++;
            }
        }
        System.out.println(res);
    }
}
