#include <bits/stdc++.h>
int main() {
  int n, i, j, counter = -1;
  int H[21];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &H[i]);
    counter++;
    for (j = 0; j < i; j++) {
      if (H[i] > H[j]) {
        continue;
      } else {
        break;
        counter -= 1;
      }
      counter++;
    }
  }
  printf("%d\n", counter);
  return 0;
}
