#include "bits/stdc++.h"
using namespace std;

const int N=2e5+20;

int n,a[N],mn=INT_MAX,ans;

int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];

		if(a[i]<mn) ans++;
		mn=min(mn,a[i]);
	}

	cout<<ans;
}