#include <iostream>
using namespace std;

int main() {
	int N;
	cin >> N;
	int ans = 0;
	int min = 2000000;
	for (int i = 0; i < N; i++) {
		int P;
		cin >> P;
		if (min >= P) {
			ans++;
			min = P;
		}
	}
	cout << ans << endl;
}

