#include <bits/stdc++.h>
using namespace std;
int dx[8] = {0, -1, -1, -1, 0, 1, 1, 1};
int dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
string bin(int n);
void generate100binary();
bool valid(int x, int y) { return (x >= 0 and y >= 0); }
int n, w;
vector<pair<long long, long long>> v;
long long dp[1000][1000];
int maximumweight(long long i, long long weight, long long value) {
  static long long dp[1000][1000];
  if (weight > w) return -1;
  if (i >= v.size()) {
    if (weight <= w)
      return dp[i][weight];
    else
      return -1;
  }
  if (dp[i][weight])
    return dp[i][weight];
  else
    return dp[i][weight] = max(
               maximumweight(i + 1, weight + v[i].first, value + v[i].second),
               maximumweight(i + 1, weight, value));
  return max(maximumweight(i + 1, weight + v[i].first, value + v[i].second),
             maximumweight(i + 1, weight, value));
}
bool validd(int x, int n) { return (x >= 0 and x < n); }
void code() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  ;
  int cnt = 0;
  for (int i = 1; i < n; i++) {
    vector<int> copp;
    for (int j = 0; j < i; j++) {
      copp.push_back(v[j]);
    }
    if (v[i] > *max_element(copp.begin(), copp.end()) or
        v[i] < *min_element(copp.begin(), copp.end()))
      cnt++;
  }
  cout << cnt << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    code();
  }
}
string bin(int n) {
  string s = "";
  bitset<7> bs = n;
  for (int i = 0; i < bs.size(); i++) {
    s += to_string(bs[i]);
  }
  reverse(s.begin(), s.end());
  return s;
}
void generate100binary() {
  for (int i = 0; i <= 100; i++) {
    cout << i << " : ";
    cout << bin(i) << '\n';
  }
}
