#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> scores;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    scores.push_back(temp);
  }
  int max = scores[0];
  int min = scores[0];
  int count = 0;
  for (int s : scores) {
    if (s > max) {
      max = s;
      count++;
    }
    if (s < min) {
      min = s;
      count++;
    }
  }
  cout << count << "\n";
  return 0;
}
