#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  int y;
  int min;
  int count = 1;
  cin >> x;
  cin >> y;
  min = y;
  for (int i = 1; i < x; i++) {
    cin >> y;
    if (y < min) {
      count++;
      min = y;
    }
  }
  cout << count;
  return 0;
}
