#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, total = 0;
  cin >> n;
  int a[110];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    total = total + a[i];
  }
  int ave;
  ave = total * 100 / n;
  int answ, ans = 10000;
  for (int i = 0; i < n; i++) {
    int b;
    b = a[i] * 100 - ave;
    if (b < 0) b = -b;
    if (b < ans) {
      ans = b;
      answ = i;
    }
  }
  cout << answ << endl;
}
