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

int main() {
	int n, a = 0, b = 100000000, count = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		if (b > a) {
			b = a;
			count++;
		}
	}
	cout << count << endl;
}