import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int[] p = new int[n]; p new int[n] n int min = 100000*2; min 100000*2 100000 2 int count = 0; count 0 for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    } {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    } p[i] = Integer.parseInt(str[i]) p[i] p i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i min = Math.min(p[i],min) min Math.min(p[i],min) Math.min Math p[i] p i min if(p[i]<=min)
        count++; p[i]<=min p[i] p i min count++ count 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) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    String[] str = in.readLine().split(" ");
    int[] p = new int[n];
    int min = 100000*2;
    int count = 0;
    
    for(int i=0; i<n; i++) {
      p[i] = Integer.parseInt(str[i]);
      min = Math.min(p[i],min);
      if(p[i]<=min)
        count++;
    }

    System.out.println(count);
  }
}