#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  int min;
  int ans = 1;
  cin >> N >> min;

  for(int i=0;i<N-1;++i){
    int s; cin >> s;
    if(s < min){
      ans += 1;
      min = s;
    }
  }
  cout << ans << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1LL << 60;

int main() {
    int n;
    cin >> n;
    int *p = new int[n];
    for (int i = 0; i < n; i++) {
        cin >> p[i];
    }
    int cnt = 0;
    int min = INT_MAX;
    for (int i = 0; i < n; i++) {
        if (p[i] <= min) {
            min = p[i];
            cnt++;
        }
    }
    cout << cnt << endl;
    return 0;
}