#include <bits/stdc++.h>
using namespace std;
int main() {
  long int i, j, m, n, max, min, count = 0;
  int a[1001], b[1001];
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  max = a[1];
  min = a[1];
  for (i = 2, j = 0; i <= n; i++) {
    if (a[i] > max) {
      count++;
      max = a[i];
    }
  }
  for (i = 2, j = m; i <= n; i++) {
    if (a[i] < min) {
      count++;
      min = a[i];
    }
  }
  cout << count;
}
