#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 5;
int a[N], sum[N], n, s, f;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  scanf("%d%d", &s, &f);
  for (int i = n; i < n + n; i++) a[i] = a[i - n];
  for (int i = 0; i < n + n; i++) {
    if (!i)
      sum[i] = a[i];
    else
      sum[i] = sum[i - 1] + a[i];
  }
  int len = f - s;
  int mx = -1, ans = 1;
  int t = s;
  for (int i = 0; i < n; i++) {
    int cnt = i ? sum[i + len - 1] - sum[i - 1] : sum[i + len - 1];
    if (cnt > mx || cnt == mx && t < ans) {
      mx = cnt;
      ans = t;
    }
    t--;
    if (t == 0) t = n;
  }
  printf("%d\n", ans);
  return 0;
}
