#include <iostream>

using namespace std;

int main() {
	int n,min=300000,ans=0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int t;
		cin >> t;
		if (t <= min) {
			ans++;
			min = t;
		}
	}
	cout << ans << endl;
	return 0;
}