#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  reverse(v.begin(), v.end());
  int ct = 1;
  for (int i = 0; i < n - 1; ++i) {
    if (v[i] >= v[n - 1]) ct++;
  }
  cout << ct;
  return 0;
}
