#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, x;
  cin >> n;
  cin >> x;
  int maxx = x, min = x;
  n = n - 1;
  int c = 0;
  while (n--) {
    int y;
    cin >> y;
    if (y > maxx) {
      maxx = y;
      c++;
    }
    if (y < min) {
      min = y;
      c++;
    }
  }
  cout << c;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
    cout << endl;
  }
  return 0;
}
