#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  int s, f;
  cin >> s >> f;
  f--;
  vector<long long> pref(n + 1);
  for (int i = 1; i <= n; i++) pref[i] = pref[i - 1] + a[i];
  long long ans = 0, ans_index;
  int f1 = f, s1 = s;
  for (int i = 0; i < n; i++) {
    long long p1 = 0, p2 = 0;
    if (f - s > 0) {
      p1 = pref[f] - pref[s - 1];
      if (p1 > ans) {
        ans = p1;
        ans_index = i + 1;
      }
    } else {
      p1 = pref[f];
      p2 = pref[n] - pref[s - 1];
      if (p1 + p2 > ans) {
        ans = p1 + p2;
        ans_index = i + 1;
      }
    }
    f--;
    if (f == 0) f = n;
    s--;
    if (s == 0) s = n;
  }
  cout << ans_index;
}
