#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1E5 + 3;
int n, f, awesome;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> f;
  int maximum = f;
  int minimum = f;
  for (int i = 1; i < n; i++) {
    cin >> f;
    if (f > maximum) {
      awesome++;
      maximum = f;
      continue;
    }
    if (f < minimum) {
      awesome++;
      minimum = f;
      continue;
    }
  }
  cout << awesome << endl;
}
