#include <bits/stdc++.h>
using namespace std;
int n, m, mn, mx, c;
int main() {
  cin >> n >> m;
  mx = mn = m;
  for (int i = 0; i < n - 1; i++) {
    cin >> m;
    if (mn < m) c++, mn = m;
    if (mx > m) c++, mx = m;
  }
  cout << c;
  return 0;
}
