#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int N;
  cin >> N;
  int arr[N];
  for (int i = 0; i < N; i++) cin >> arr[i];
  int ans = 0, max = arr[0], min = arr[0];
  for (int x : arr) {
    if (x > max) {
      max = x;
      ans++;
    } else if (x < min) {
      min = x;
      ans++;
    }
  }
  cout << ans;
}
