#include <bits/stdc++.h>
using namespace std;
int a[1000005], s[1000005];
int n, l, r;
int calc(int num) {
  int ans = 1 - num + l;
  while (ans <= 0) ans += n;
  while (ans > n) ans -= n;
  return ans;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), s[i] = s[i - 1] + a[i];
  cin >> l >> r;
  int len = r - l, maxx = 0, num = 0;
  for (int i = 1; i <= n; ++i) {
    int t = 0;
    if (i + len - 1 > n)
      t = s[n] - s[i - 1] + s[len - (n - i + 1)];
    else
      t = s[i + len - 1] - s[i - 1];
    if (t > maxx) {
      maxx = t;
      num = calc(i);
    } else if (t == maxx) {
      num = min(num, calc(i));
    }
  }
  cout << num << endl;
  return 0;
}
