#include <bits/stdc++.h>
using namespace std;
int main() {
  int N = 0;
  cin >> N;
  int H0 = 0;
  cin >> H0;
  int H = 0;
  int count = 1;
  for (int i = 0; i < N - 1; i++) {
    cin >> H;
    if (H > H0) {
      break;
    }
    count++;
  }
  cout << count;
  return 0;
}
