#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 1000000;
int main() {
  int n;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) cin >> A[i];
  int ans = -1;
  int k = 0;
  while (ans == -1) {
    for (int i = 0; i < n; i++) {
      if (k >= A[i]) {
        ans = i;
        break;
      }
      k++;
    }
  }
  cout << ans + 1 << endl;
  return 0;
}
