#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, min, max, ctr = 0;
  cin >> n;
  cin >> a;
  max = a;
  min = a;
  for (int i = 0; i < n - 1; i++) {
    cin >> a;
    if (a > max) {
      ctr++;
      max = a;
    } else if (a < min) {
      min = a;
      ctr++;
    }
  }
  cout << ctr;
  return 0;
}
