#include <bits/stdc++.h>
const int maxn = (int)1e5 + 5;
using namespace std;
int a[maxn], sum[maxn];
int main() {
  memset(sum, 0, sizeof(sum));
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum[i] = sum[i - 1] + a[i];
  }
  int s, f;
  scanf("%d %d", &s, &f);
  long long Max = -1, ans = 0;
  for (int i = 1; i <= n; i++) {
    int st = s - i + 1, en = f - i;
    while (st < 1) st += n, en += n;
    long long v;
    if (en <= n)
      v = sum[en] - sum[st - 1];
    else
      v = sum[en - n] + sum[n] - sum[st - 1];
    if (Max < v) Max = v, ans = i;
  }
  printf("%d\n", ans);
  return 0;
}
