#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
long long powermod(long long x, long long n, long long M) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % M;
    x = (x * x) % M;
    n = n / 2;
  }
  return result;
}
vector<long long> readll() {
  cin >> ws;
  vector<long long> v;
  string input;
  getline(cin, input);
  cout << input;
  istringstream is(input);
  long long num;
  while (is >> num) v.push_back(num);
  return v;
}
long long modinv(long long n, long long p) { return powermod(n, p - 2, p); }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long fact[1000005], invf[1000005];
void facmod(long long n, long long M) {
  long long i;
  fact[0] = fact[1] = 1;
  for (i = 2; i <= n; ++i) {
    fact[i] = ((fact[i - 1]) % M * (i % M)) % M;
  }
  invf[n] = modinv(fact[n], M);
  for (i = n - 1; i >= 0; --i) {
    invf[i] = invf[i + 1] * (i + 1);
    invf[i] %= M;
  }
}
void solve() {
  long long i, n;
  cin >> n;
  long long a[n + 4];
  long long c = 0, mn = LLONG_MAX, mx = LLONG_MIN;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
    if (i == 0) {
      mn = mx = a[i];
    } else {
      if (a[i] > mx || a[i] < mn) {
        c++;
        mn = min(mn, a[i]);
        mx = max(mx, a[i]);
      }
    }
  }
  cout << c;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
