#include <bits/stdc++.h>
using namespace std;
int vis[200];
int main() {
  int a, b, mx = 0, mn = 2000000000;
  cin >> a;
  int res = 0;
  for (int i = 0; i < a; ++i) {
    cin >> b;
    if (i) {
      if (b > mx) res++;
      if (b < mn) res++;
      mx = max(mx, b);
      mn = min(mn, b);
    } else
      mx = mn = b;
  }
  cout << res << endl;
  return 0;
}
