#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  float a[100];
  cin >> n;
  float sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  float avg = sum / n;
  for (int i = 0; i < n; ++i) {
    if (a[i] > avg) {
      cout << i - 1;
      break;
    }
  }
  return 0;
}
