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