#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> ratings(n);
  for (int i = 0; i < n; i++) cin >> ratings[i];
  int w = ratings[0], b = ratings[0], count = 0;
  for (int i = 1; i < n; i++) {
    if (ratings[i] > b) {
      b = ratings[i];
      count++;
    } else if (ratings[i] < w) {
      w = ratings[i];
      count++;
    }
  }
  cout << count;
}
