#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, each, mx, mn, count(0);
  cin >> n;
  cin >> each;
  mx = each;
  mn = each;
  while (n-- > 1) {
    cin >> each;
    if (each < mn) {
      count++;
      mn = each;
    } else if (each > mx) {
      count++;
      mx = each;
    }
  }
  cout << count << "\n";
  return 0;
}
