#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w, d, niz[100010], f, s, rez = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> niz[i];
  cin >> s >> f;
  for (int i = s; i <= f - 1; i++) d += niz[i];
  for (int i = 1; i <= n; i++) {
    if (d > rez) {
      d = rez;
      w = i;
    }
    s--;
    f--;
    if (s < 1) s += n;
    if (f < 1) f += n;
    d = d - niz[f] + niz[s];
  }
  cout << w;
  return 0;
}
