#include <bits/stdc++.h>
int main(void) {
  int n, i, count = 0;
  int h[20];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &h[i]);
  }
  for (i = 1; i <= n; i++) {
    if (h[i - 1] < h[i] && h[0] < h[i]) count++;
  }
  printf("%d", count);
  return 0;
}
