#include <bits/stdc++.h>
using namespace std;
int a[101], sum;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  int minv = sum;
  for (int i = 1; i <= n; i++) {
    minv = min(minv, abs(sum - a[i] * n));
  }
  for (int i = 1; i <= n; i++) {
    if (abs(sum - a[i] * n) == minv) {
      printf("%d ", i - 1);
    }
  }
  return 0;
}
