#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> H(N);
  for (int i = 0; i < H.size(); ++i) {
    cin >> H[i];
  }
  int count = 0;
  cin >> count;
  for (int i = 0; i < H.size(); ++i) {
    if (H[i] >= H[0] && H[i - 1] <= H[i]) count++;
  }
  cout << count << endl;
}
