import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    }

    private static Scanner scanner = new Scanner(System.in);

    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }

    private static void Print(Object... o) {
        for (Object i : o) System.out.print(i);
        System.out.println();
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    }

    private static Scanner scanner = new Scanner(System.in);

    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }

    private static void Print(Object... o) {
        for (Object i : o) System.out.print(i);
        System.out.println();
    }
} Main private static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[] args) {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    } main {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    } int n = getInput().get(0); n getInput().get(0) getInput().get getInput() getInput 0 ArrayList<Integer> p = getInput(); p getInput() getInput int count = 1; count 1 int tmin = Integer.MAX_VALUE; tmin Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        } {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        } tmin = Math.min(p.get(i - 1), tmin) tmin Math.min(p.get(i - 1), tmin) Math.min Math p.get(i - 1) p.get p i - 1 i 1 tmin if (p.get(i) <= tmin) ++count; p.get(i) <= tmin p.get(i) p.get p i tmin ++count count Print(count) Print count String[] args args private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    } getInput {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    } String in = scanner.nextLine(); in scanner.nextLine() scanner.nextLine scanner ArrayList<Integer> result = new ArrayList<>(); result new ArrayList<>() for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        } String t in.split(" ") in.split in " " {
            result.add(Integer.parseInt(t));
        } {
            result.add(Integer.parseInt(t));
        } result.add(Integer.parseInt(t)) result.add result Integer.parseInt(t) Integer.parseInt Integer t return result; result private static void Print(Object o) {
        System.out.println(o);
    } Print {
        System.out.println(o);
    } System.out.println(o) System.out.println System.out System System.out o Object o o private static void Print(Object... o) {
        for (Object i : o) System.out.print(i);
        System.out.println();
    } Print {
        for (Object i : o) System.out.print(i);
        System.out.println();
    } for (Object i : o) System.out.print(i); Object i o System.out.print(i); System.out.print(i) System.out.print System.out System System.out i System.out.println() System.out.println System.out System System.out Object... o o public class Main {
    public static void main(String[] args) {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    }

    private static Scanner scanner = new Scanner(System.in);

    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }

    private static void Print(Object... o) {
        for (Object i : o) System.out.print(i);
        System.out.println();
    }
} public class Main {
    public static void main(String[] args) {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    }

    private static Scanner scanner = new Scanner(System.in);

    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }

    private static void Print(Object... o) {
        for (Object i : o) System.out.print(i);
        System.out.println();
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int n = getInput().get(0);
        ArrayList<Integer> p = getInput();

        int count = 1;
        int tmin = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            tmin = Math.min(p.get(i - 1), tmin);
            if (p.get(i) <= tmin) ++count;
        }

        Print(count);
    }

    private static Scanner scanner = new Scanner(System.in);

    private static ArrayList<Integer> getInput() {
        String in = scanner.nextLine();

        ArrayList<Integer> result = new ArrayList<>();
        for (String t : in.split(" ")) {
            result.add(Integer.parseInt(t));
        }

        return result;
    }

    private static void Print(Object o) {
        System.out.println(o);
    }

    private static void Print(Object... o) {
        for (Object i : o) System.out.print(i);
        System.out.println();
    }
}
