#include <bits/stdc++.h>
int main() {
  int a[105];
  int b[105];
  int N, temp, i, j, ng;
  int count = 0;
  scanf("%d", &N);
  for (j = 0; j < N; j++) {
    scanf("%d", &a[j]);
  }
  temp = a[0];
  for (i = 0; i < N; i++) {
    if (temp <= a[i]) {
      b[count] = a[i];
      count++;
    }
  }
  b[count] = 1000;
  for (j = 0; j < count; j++) {
    if (b[j] > b[j + 1]) {
      ng++;
    }
  }
  if (count > ng) {
    count = count - ng;
  } else {
    count = 1;
  }
  printf("%d", count);
  return 0;
}
