
import java.util.Scanner;

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

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

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

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

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

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int count = 0; count 0 for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        } int i = 1 ; int i = 1 ; i 1 i <= N i N i++ i++ i {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        } {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        } int P = scanner.nextInt(); P scanner.nextInt() scanner.nextInt scanner if (P <= min) {
                count++;
                min = P;
            } P <= min P min {
                count++;
                min = P;
            } count++ count min = P min P System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

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

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

    }
} Main

import java.util.Scanner;

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

        int N = scanner.nextInt();
        int min = Integer.MAX_VALUE;
        int count = 0;

        for (int i = 1 ; i <= N ; i++) {
            int P = scanner.nextInt();

            if (P <= min) {
                count++;
                min = P;
            }
        }

        System.out.println(count);

    }
}
