#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int counter = 0;
  int minn = INT_MAX;
  int maxx = -INT_MAX;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (i != 0) {
      if (x < minn || x > maxx) counter++;
    }
    minn = min(minn, x);
    maxx = max(maxx, x);
  }
  cout << counter;
  return 0;
}
