#include <iostream>

int main()
{
	int N;
	std::cin >> N;
	int P;
	int sum;
	int JK = 1;
	std::cin >> sum;
	for (int i = 1; i < N; i++) {
		std::cin >> P;
		if (P < sum) {
			sum = P;
			JK++;
		}
	}

	std::cout << JK;
}