#include <bits/stdc++.h>
using namespace std;
int main(void) {
  double n = 0, b = 0, a[100];
  cin >> n;
  for (int i = 0; i != n; i++) {
    cin >> a[i];
    b += a[i];
  }
  b /= n;
  int d = 0;
  double c = 0;
  for (int i = 0; i != n; i++) {
    if (a[i] > c) {
      c = a[i];
      d = i;
    }
  }
  cout << d - 1 << endl;
  return 0;
}
