#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, point, count = 0;
  cin >> n;
  cin >> point;
  int min = point, max = point;
  for (int i = 1; i < n; i++) {
    cin >> point;
    if (point > max) {
      max = point;
      count++;
    } else if (point < min) {
      min = point;
      count++;
    }
  }
  cout << count;
  return 0;
}
