#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a = -1, b = -1, res = 0;
  cin.sync_with_stdio(false);
  cin >> n;
  for (int i = 0, ai; i < n; i++) {
    cin >> ai;
    if (ai > a) {
      b = a;
      a = ai;
      res++;
    } else if (ai > b) {
      a = ai;
    }
  }
  cout << res << endl;
  return 0;
}
