#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, cnt = 1, ans = 0;
  int tmp, indx, c;
  int mn = 1e9;
  vector<int> vi;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    tmp;
    scanf("%d", &tmp);
    vi.push_back(tmp);
    tmp -= i;
    c = (tmp + n - 1) / n;
    if (mn > c) {
      mn = c;
      indx = i + 1;
    }
  }
  cout << indx << endl;
  return 0;
}
