#include <iostream>

using namespace std;

int N;
int mn=200000;
int cnt;

int main()
{
	cin >> N;
	for (int i=1; i<=N; i++)
	{
		int tmp;
		cin >> tmp;
		if (tmp<=mn) cnt++;
		mn=min(mn,tmp);
	}
	cout << cnt << endl;
	return 0;
}