#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int tmp;
  int ans = 0;
  vector<int> h;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    h.push_back(tmp);
  }
  for (int i = 0; i < n; i++) {
    if (h[i] <= h[i + 1] && h[0] <= h[i + 1]) {
      ans++;
    }
  }
  cout << ans + 1 << endl;
  return 0;
}
