import java.util.Scanner;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = n; m n int a = 0; a 0 for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    } {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    } int c = Integer.parseInt(sc.next()); c Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc m = Math.min(m, c) m Math.min(m, c) Math.min Math m c if (m >= c) {
        a += 1;
      } m >= c m c {
        a += 1;
      } a += 1 a 1 System.out.println(a) System.out.println System.out System System.out a String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  }
} Main
import java.util.Scanner;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int m = n;
    int a = 0;
    for (int i = 0; i < n; i++) {
      int c = Integer.parseInt(sc.next());
      m = Math.min(m, c);
      if (m >= c) {
        a += 1;
      }
    }
    System.out.println(a);
  }
}
