#include <cstdio>

int main()
{
	int n;
	scanf("%d", &n);
	int mn = 2147483647, ans = 0;
	for (int i = 1; i <= n; i++)
	{
		int x;
		scanf("%d", &x);
		if (mn > x) mn = x, ans++;
	}
	printf("%d\n", ans);
}