#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, count = 0;
  cin >> a;
  int arr[a - 1];
  for (int i = 0; i < a; i++) cin >> arr[i];
  int max = arr[0];
  int min = arr[0];
  for (int i = 1; i < a; i++) {
    if (arr[i] < min) {
      min = arr[i];
      count++;
    } else if (arr[i] > max) {
      max = arr[i];
      count++;
    }
  }
  cout << count << endl;
}
