#include <bits/stdc++.h>
int main() {
  int competencia[1000];
  int n, i, mayor, menor, cont = 0;
  do {
    scanf("%d", &n);
  } while (n < 1 || n > 1000);
  for (i = 0; i < n; i++) {
    do {
      scanf("%d", &competencia[i]);
    } while (competencia[i] < 0 || competencia[i] > 10000);
  }
  mayor = competencia[0];
  menor = competencia[0];
  for (i = 1; i < n; i++) {
    if (competencia[i] > mayor) {
      cont++;
      mayor = competencia[i];
    }
    if (competencia[i] < menor) {
      cont++;
      menor = competencia[i];
    }
  }
  printf("%d", cont);
  return 0;
}
