#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, tmp = 10000, result, a[101];
  double average = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    average += a[i];
  }
  average /= n;
  for (int i = 0; i < n; ++i) {
    if (tmp > a[i]) {
      tmp = a[i];
      result = i;
    }
  }
  cout << result << endl;
  return 0;
}
