#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  int count = 1;
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 1; i < n; i++) {
    if (v[n] >= v[n - 1]) count++;
  }
  cout << count << endl;
}
