#include <bits/stdc++.h>
using namespace std;
long long a[110000], sum[110000];
int main() {
  long long n, k, ma = 0, ans, t = 110000, s, f;
  cin >> n;
  sum[0] = 0;
  for (long long i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    sum[i] = sum[i - 1] + a[i];
  }
  for (long long i = n + 1; i <= 2 * n; i++) {
    sum[i] = sum[i - 1] + a[i - n];
  }
  cin >> s >> f;
  long long d = f - s;
  for (long long i = 1 + n; i <= 2 * n; i++) {
    long long j = i - d;
    if (sum[i] - sum[j] > ma) {
      ma = sum[i] - sum[j];
    }
  }
  for (long long i = 1 + n; i <= 2 * n; i++) {
    long long j = i - d;
    if (sum[i] - sum[j] == ma) {
      j++;
      if (j > n) j -= n;
      long long t1 = s - (j - 1);
      if (t1 <= 0) t1 += n;
      if (t > t1) t = t1;
    }
  }
  cout << t << endl;
  return 0;
}
