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