#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  int counter = 0;
  cin >> x;
  int lowest;
  int increased;
  int arr[x];
  for (int i = 0; i < x; i++) {
    cin >> arr[i];
  }
  lowest = arr[0];
  increased = lowest;
  for (int i = 1; i < x; i++) {
    if (lowest > arr[i]) {
      counter++;
      lowest = arr[i];
    } else if (increased < arr[i]) {
      counter++;
      increased = arr[i];
    }
  }
  cout << counter << endl;
  return 0;
}
