#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, temp, max, min, cnt = 0;
  cin >> x;
  cin >> temp;
  min = temp;
  max = temp;
  for (int i = 1; i < x; i++) {
    cin >> temp;
    if (temp < min) {
      min = temp;
      cnt++;
    }
    if (temp > max) {
      max = temp;
      cnt++;
    }
  }
  cout << cnt;
}
