import java.util.*;

class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt(),ans=0;
		int[] p = new int[N];
		for(int i=0;i<N;i++) p[i]=sc.nextInt();
      	int m = p[0];
		for(int i=0;i<N;i++) {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt(),ans=0;
		int[] p = new int[N];
		for(int i=0;i<N;i++) p[i]=sc.nextInt();
      	int m = p[0];
		for(int i=0;i<N;i++) {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		}
		System.out.println(ans);
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int N=sc.nextInt(),ans=0;
		int[] p = new int[N];
		for(int i=0;i<N;i++) p[i]=sc.nextInt();
      	int m = p[0];
		for(int i=0;i<N;i++) {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		}
		System.out.println(ans);
	} main {
		int N=sc.nextInt(),ans=0;
		int[] p = new int[N];
		for(int i=0;i<N;i++) p[i]=sc.nextInt();
      	int m = p[0];
		for(int i=0;i<N;i++) {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		}
		System.out.println(ans);
	} int N=sc.nextInt() N sc.nextInt() sc.nextInt sc ans=0; ans 0 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] p i sc.nextInt() sc.nextInt sc int m = p[0]; m p[0] p 0 for(int i=0;i<N;i++) {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		} {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		} m = Math.min(m,p[i]) m Math.min(m,p[i]) Math.min Math m p[i] p i if(m==p[i]) ans++; m==p[i] m p[i] p i ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt(),ans=0;
		int[] p = new int[N];
		for(int i=0;i<N;i++) p[i]=sc.nextInt();
      	int m = p[0];
		for(int i=0;i<N;i++) {
			m = Math.min(m,p[i]);
          	if(m==p[i]) ans++;
		}
		System.out.println(ans);
	}
}