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