#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
int A[3][3], N;
bool punched[3][3];
bool ok[3][3];
using Graph = vector<vector<int>>;
vector<vector<int>> field;
vector<bool> seen;
const int MOD = 1000000007;
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
bool is_prime(long long N) {
  if (N == 1) return false;
  for (long long i = 2; i * i <= N; ++i) {
    if (N % i == 0) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  int h[n + 1];
  for (int i = (0); i < (n); ++i) {
    cin >> h[i];
  }
  int ans = 1;
  for (int i = 1; i < n; i++) {
    if (i != n - 1) {
      if (h[0] <= h[i] && h[1] <= h[i] && h[i - 1] <= h[i]) {
        ans++;
      }
    } else {
      if (h[0] <= h[i] && h[1] <= h[i]) {
        ans++;
      }
    }
  }
  cout << ans << endl;
}
