import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        }
    }
} import java.io.InputStream; InputStream java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        }
    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Solver solver = new Solver(); solver new Solver() solver.solve(in, out) solver.solve solver in out out.close() out.close out String[] args args static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        }
    } Solver public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        } solve {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int count = 0; count 0 int PjMin = Integer.MAX_VALUE; PjMin Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            } {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            } int Pi = in.nextInt(); Pi in.nextInt() in.nextInt in if (Pi <= PjMin) {
                    count++;
                } Pi <= PjMin Pi PjMin {
                    count++;
                } count++ count if (PjMin >= Pi) {
                    PjMin = Pi;
                } PjMin >= Pi PjMin Pi {
                    PjMin = Pi;
                } PjMin = Pi PjMin Pi out.println(count) out.println out count Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        }
    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        }
    }
} Main
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(in, out);
        out.close();
    }

    static class Solver {
        public void solve(Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int count = 0;
            int PjMin = Integer.MAX_VALUE;

            for (int i = 0; i < N; i++) {
                int Pi = in.nextInt();
                if (Pi <= PjMin) {
                    count++;
                }
                if (PjMin >= Pi) {
                    PjMin = Pi;
                }
            }
            out.println(count);
        }
    }
}