#include <iostream>
using namespace std;
int main() {
 int ans = 0, n;
 cin >> n;
 int mx = n;
 for (int i = 0; i < n; i++) {
   int x; cin >> x;
   if (mx >= x) ans++;
   mx = min(x,mx);
 }
 cout << ans;
}
