#include <bits/stdc++.h>
int main() {
  int mayor, resp, band, menor;
  int n, i;
  scanf("%d", &n);
  int points[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &points[i]);
  }
  mayor = points[0];
  menor = points[0];
  resp = 0;
  band = 1;
  for (i = 1; i < n; i++) {
    if (points[i] > mayor) {
      resp++;
      mayor = points[i];
    }
    if (points[i] < menor) {
      resp++;
      menor = points[i];
    }
  }
  printf("%d", resp);
  return 0;
}
