#include <bits/stdc++.h>
int main() {
  int n;
  int h[101];
  int first;
  int sum = 0;
  scanf("%d", &n);
  for (int cnt = 0; cnt < n; cnt++) {
    scanf("%d", &h[cnt]);
    if (h[0] <= h[cnt] && h[1] <= h[cnt] && h[cnt - 1] <= h[cnt]) {
      sum++;
    }
  }
  printf("%d", sum);
  printf("\n");
}
