import java.util.Scanner;
import java.util.Vector;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] sequence = new int[n];
    for(int i = 0; i < n; i++){
      sequence[i] = sc.nextInt();
    }
    int koike = 1;
    int tanaka = 0;
    int min = sequence[0];
    for(int i = 0; i < n; i++){
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    }
    System.out.println(tanaka);
  }
} import java.util.Scanner; Scanner java.util import java.util.Vector; Vector java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] sequence = new int[n];
    for(int i = 0; i < n; i++){
      sequence[i] = sc.nextInt();
    }
    int koike = 1;
    int tanaka = 0;
    int min = sequence[0];
    for(int i = 0; i < n; i++){
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    }
    System.out.println(tanaka);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] sequence = new int[n];
    for(int i = 0; i < n; i++){
      sequence[i] = sc.nextInt();
    }
    int koike = 1;
    int tanaka = 0;
    int min = sequence[0];
    for(int i = 0; i < n; i++){
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    }
    System.out.println(tanaka);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] sequence = new int[n];
    for(int i = 0; i < n; i++){
      sequence[i] = sc.nextInt();
    }
    int koike = 1;
    int tanaka = 0;
    int min = sequence[0];
    for(int i = 0; i < n; i++){
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    }
    System.out.println(tanaka);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] sequence = new int[n]; sequence new int[n] n for(int i = 0; i < n; i++){
      sequence[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      sequence[i] = sc.nextInt();
    } {
      sequence[i] = sc.nextInt();
    } sequence[i] = sc.nextInt() sequence[i] sequence i sc.nextInt() sc.nextInt sc int koike = 1; koike 1 int tanaka = 0; tanaka 0 int min = sequence[0]; min sequence[0] sequence 0 for(int i = 0; i < n; i++){
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    } {
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    } if(min >= sequence[i]){
        tanaka++;
      } min >= sequence[i] min sequence[i] sequence i {
        tanaka++;
      } tanaka++ tanaka min = Math.min(min,sequence[i]) min Math.min(min,sequence[i]) Math.min Math min sequence[i] sequence i System.out.println(tanaka) System.out.println System.out System System.out tanaka String[] args args
import java.util.Scanner;
import java.util.Vector;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] sequence = new int[n];
    for(int i = 0; i < n; i++){
      sequence[i] = sc.nextInt();
    }
    int koike = 1;
    int tanaka = 0;
    int min = sequence[0];
    for(int i = 0; i < n; i++){
      if(min >= sequence[i]){
        tanaka++;
      }
      min = Math.min(min,sequence[i]);
    }
    System.out.println(tanaka);
  }
}