#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int count = 0;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  for (int i = 0; i < N; i++) {
    int mou = max(vec.at(0), vec.at(i + 1));
    if (mou == vec.at(i + 1)) {
      count++;
      break;
    }
  }
  for (int i = 0; i < N; i++) {
    int mou = max(vec.at(i), vec.at(i + 1));
    if (mou == vec.at(i + 1)) {
      count++;
    }
  }
  cout << count << endl;
}
