#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, l, r, p = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    if (i == 0) {
      l = x;
      r = x;
    }
    if (x < l) {
      p++;
      l = x;
    }
    if (x > r) {
      p++;
      r = x;
    }
  }
  cout << p << endl;
  return 0;
}
