import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  } main {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int[] P = new int[N]; P new int[N] N int count = 0; count 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    } {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    } P[i] = scan.nextInt() P[i] P i scan.nextInt() scan.nextInt scan if(min > P[i]) {
        count++;
        min = P[i];
      } min > P[i] min P[i] P i {
        count++;
        min = P[i];
      } count++ count min = P[i] min P[i] P i scan.close() scan.close scan 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) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    int[] P = new int[N];
    int count = 0;
    int min = Integer.MAX_VALUE;
    for(int i=0; i<N; i++) {
      P[i] = scan.nextInt();
      if(min > P[i]) {
        count++;
        min = P[i];
      }
    }
    scan.close();

    System.out.println(count);
  }
}