#include <bits/stdc++.h>
int colas[100000];
int main() {
  int n, j = 0, breaker = 0, entrance;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &colas[i]);
  }
  for (int i = 0; breaker == 0; i++) {
    if (i == n) {
      i = 0;
    }
    colas[i] -= j;
    if (colas[i] <= 0) {
      entrance = i + 1;
      breaker = 1;
    }
    if (j < n) {
      j++;
    }
  }
  printf("%d", entrance);
  return 0;
}
