#include <algorithm>
#include <iostream>

using namespace std;

int main()
{
  int n; cin >> n;
  int mn = 300000, cnt = 0;
  for (int i = 0; i < n; ++i) {
    int p; cin >> p;
    if (p < mn) {mn = p; ++cnt;}
  }
  cout << cnt << endl;
}