#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long A[n];
  for (auto &i : A) cin >> i;
  long long mn = A[0], mx = A[0], c = 0;
  for (long long i = 1; i < n; i++) {
    if (A[i] > mx) {
      c++;
      mx = A[i];
    } else if (A[i] < mn) {
      c++;
      mn = A[i];
    }
  }
  cout << c << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
