#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, points[1000], c = 0, max1, min1;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> points[i];
  max1 = points[0];
  min1 = points[0];
  for (int j = 1; j < n; j++) {
    if (points[j] > max1) {
      max1 = points[j];
      c++;
    }
    if (points[j] < min1) {
      min1 = points[j];
      c++;
    }
  }
  cout << c;
  return 0;
}
