#include <bits/stdc++.h>
using namespace std;
const long long inf = 1LL << 61;
const long long mod = 1000000007;
const int maxn = 1e5 + 10;
long long a[maxn], sum[2 * maxn];
int main() {
  std::ios::sync_with_stdio(false);
  int n, s, f;
  scanf("%d", &n);
  memset(sum, 0, sizeof(sum));
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    sum[i] = a[i] + sum[i - 1];
  }
  for (int i = n + 1; i <= 2 * n; i++) {
    sum[i] = sum[i - 1] + a[i - n];
  }
  scanf("%d%d", &s, &f);
  int maxv = 0, st = 1, d = f - s;
  int ans = n + 1;
  for (int i = d; i < d + n; i++) {
    int t = i;
    long long tpsum;
    tpsum = sum[t] - sum[t - d];
    if (tpsum > maxv) {
      maxv = tpsum;
      st = t - d + 1;
      if (st <= 0) st += n;
      if (st > n) st -= n;
      int tans = s - st + 1;
      if (tans <= 0) tans += n;
      ans = tans;
    } else if (tpsum == maxv) {
      int tst = t - d + 1;
      if (tst <= 0) tst += n;
      if (tst > n) tst -= n;
      int tans = s - tst + 1;
      if (tans <= 0) tans += n;
      ans = min(ans, tans);
    }
  }
  printf("%d\n", ans);
  return 0;
}
