#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int temp;
  cin >> n;
  cin >> temp;
  int ans = 0;
  int MAX_ele = temp;
  int MIN_ele = temp;
  for (int i = 1; i < n; ++i) {
    cin >> temp;
    if (temp > MAX_ele) {
      ans++;
      MAX_ele = temp;
    }
    if (temp < MIN_ele) {
      ans++;
      MIN_ele = temp;
    }
  }
  cout << ans << endl;
  return 0;
}
