import java.util.*;
public class Main {
  
  public static int p[];
  public static int min = 2*10*10*10*10*10 + 1;
  
  private static boolean judge(int i){
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  }
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  }
} import java.util.*; util.* java public class Main {
  
  public static int p[];
  public static int min = 2*10*10*10*10*10 + 1;
  
  private static boolean judge(int i){
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  }
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  }
} Main public static int p[]; p public static int min = 2*10*10*10*10*10 + 1; min 2*10*10*10*10*10 + 1 2*10*10*10*10*10 10 10 10 2*10*10*10*10*10 2 10 10 10 10 10 1 private static boolean judge(int i){
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  } judge {
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  } if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    } min > p[i-1] min p[i-1] p i-1 i 1 {
      min = p[i-1];
      return true;
    } min = p[i-1] min p[i-1] p i-1 i 1 return true; true {
      return false;
    } return false; false int i i public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc 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 count = 0; count 0 for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
      if(judge(i)){
        count++;
      }
    } {
      if(judge(i)){
        count++;
      }
    } if(judge(i)){
        count++;
      } judge(i) judge i {
        count++;
      } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  
  public static int p[];
  public static int min = 2*10*10*10*10*10 + 1;
  
  private static boolean judge(int i){
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  }
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  }
} public class Main {
  
  public static int p[];
  public static int min = 2*10*10*10*10*10 + 1;
  
  private static boolean judge(int i){
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  }
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  }
} Main
import java.util.*;
public class Main {
  
  public static int p[];
  public static int min = 2*10*10*10*10*10 + 1;
  
  private static boolean judge(int i){
    
    //新たに見る配列がこれまでで最小か。
    if(min > p[i-1]){
      min = p[i-1];
      return true;
    }
    else{
      return false;
    }
    
    /*
    for(int j = 1; j <= i; j++){
      if(p[i-1] > p[j-1]){
        return false;
      }
    }
    return true;
    */
    //System.out.println();
  }
  
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
    p = new int[n];
    for(int i = 0; i < n; i++){
      p[i] = sc.nextInt();
    }
    
    int count = 0;
    
    for(int i = 1; i <= n; i++){
      if(judge(i)){
        count++;
      }
    }
    System.out.println(count);
  }
}