#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, sum = 0, i = 0, maxi, mini;
  long long x[10000];
  cin >> n;
  k = n;
  while (k--) cin >> x[i++];
  maxi = x[0];
  mini = x[0];
  i = 1;
  while (i < n) {
    if (x[i] > maxi) {
      maxi = x[i];
      sum++;
    } else if (x[i] < mini) {
      mini = x[i];
      sum++;
    }
    i++;
  }
  cout << sum << endl;
  return 0;
}
