#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int SIL[10001];
  SIL[0] = 0;
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (SIL[c] < a[i]) {
      c++;
      SIL[c] = a[i];
    } else if (SIL[c] > a[i]) {
      SIL[c] = a[i];
    }
  }
  cout << c << endl;
}
