#include <bits/stdc++.h>
using namespace std;
int n, a[200000], pref[200000], ans, tm, S, F, s, f, mx;
int find(int x) {
  if (x >= tm) {
    return x - tm;
  }
  return n - tm + x;
}
int main() {
  cin >> n >> a[0];
  pref[0] = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    pref[i] = pref[i - 1] + a[i];
  }
  cin >> S >> F;
  F--;
  for (int i = 0; i < n; i++) {
    tm = i + 1;
    s = find(S);
    f = find(F);
    if (s <= f) {
      if (s == 0) {
        if (pref[f] > mx) {
          mx = pref[f];
          ans = tm;
        }
      } else {
        if (pref[f] - pref[s - 1] > mx) {
          mx = pref[f] - pref[s - 1];
          ans = tm;
        }
      }
    } else {
      if (pref[f] + pref[n - 1] - pref[s - 1] > mx) {
        mx = pref[f] + pref[n - 1] - pref[s - 1];
        ans = tm;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
