#include <bits/stdc++.h>
int main() {
  int n, a[1000], b = 0, i, max, min = -2000001;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  max = a[0];
  min = a[0];
  for (i = 1; i < n; i++) {
    if (a[i] < min) {
      min = a[i];
      b++;
    }
    if (a[i] > max) {
      b++;
      max = a[i];
    }
  }
  printf("%d\n", b);
  return 0;
}
