#include <bits/stdc++.h>
using namespace std;
bool check(int n1) {
  vector<int> d(10, 0);
  while (n1) {
    d[n1 % 10]++;
    n1 = n1 / 10;
  }
  for (auto &x : d) {
    if (x > 1) return false;
  }
  return true;
}
void solve() {
  int n;
  cin >> n;
  int a;
  cin >> a;
  int m1 = a, m2 = a;
  int res = 0;
  for (int i = 1; i < n; i++) {
    int x;
    cin >> x;
    if (x > m1) {
      res++;
      m1 = x;
    }
    if (x < m2) {
      res++;
      m2 = x;
    }
  }
  cout << res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
