#include <bits/stdc++.h>
int main(void) {
  int n, max, min, i, amazing, score;
  scanf("%d", &n);
  scanf("%d", &max);
  min = max;
  for (amazing = 0, i = 1; i < n; i++) {
    scanf("%d", &score);
    if (max < score) {
      amazing++;
      max = score;
    } else if (min > score) {
      amazing++;
      min = score;
    }
  }
  printf("%d", amazing);
  return 0;
}
