import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int cou = 1;
    int n = sc.nextInt();
    int[] p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    int min = 999999999;
    for(int i = 1; i < n; i++){
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    }
    System.out.print(cou);
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int cou = 1;
    int n = sc.nextInt();
    int[] p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    int min = 999999999;
    for(int i = 1; i < n; i++){
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    }
    System.out.print(cou);
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int cou = 1;
    int n = sc.nextInt();
    int[] p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    int min = 999999999;
    for(int i = 1; i < n; i++){
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    }
    System.out.print(cou);
  } main {
    Scanner sc = new Scanner(System.in);
    int cou = 1;
    int n = sc.nextInt();
    int[] p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    int min = 999999999;
    for(int i = 1; i < n; i++){
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    }
    System.out.print(cou);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int cou = 1; cou 1 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] p = new int[n]; p new int[n] n for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      p[i] = sc.nextInt();
    } {
      p[i] = sc.nextInt();
    } p[i] = sc.nextInt() p[i] p i sc.nextInt() sc.nextInt sc int min = 999999999; min 999999999 for(int i = 1; i < n; i++){
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    } {
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    } min = Math.min(min,p[i-1]) min Math.min(min,p[i-1]) Math.min Math min p[i-1] p i-1 i 1 if(p[i] < min){
        cou++;
      } p[i] < min p[i] p i min {
        cou++;
      } cou++ cou System.out.print(cou) System.out.print System.out System System.out cou String args[] args
import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int cou = 1;
    int n = sc.nextInt();
    int[] p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    int min = 999999999;
    for(int i = 1; i < n; i++){
      min = Math.min(min,p[i-1]);
      if(p[i] < min){
        cou++;
      }
    }
    System.out.print(cou);
  }
}
