#include <bits/stdc++.h>
using namespace std;
void to_upper(string &s) {
  for (int i = 0; i < s.size(); i++) s[i] = toupper(s[i]);
}
void to_lower(string &s) {
  for (int i = 0; i < s.size(); i++) s[i] = tolower(s[i]);
}
int main() {
  int n;
  cin >> n;
  int x;
  cin >> x;
  n--;
  int minim = x, maxim = x;
  int res = 0;
  while (n--) {
    cin >> x;
    if (x < minim) {
      minim = x;
      res++;
    } else if (x > maxim) {
      maxim = x;
      res++;
    }
  }
  cout << res << "\n";
}
