#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long arr[N], A[N], ARR[N];
bool visited[N] = {};
long long cnt[N], freq[N];
bool f, ff;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, count(0);
  cin >> n;
  vector<int> v(n);
  for (int& i : v) cin >> i;
  for (int i = 0;; i++) {
    if (i == n) i = 0;
    if (v[i] - count <= 0) {
      cout << i + 1;
      return 0;
    } else {
      count++;
    }
  }
  return 0;
}
