#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const long long N = 1E5 + 5;
int owa(int t) {
  t = rand();
  while (t) t--;
  unordered_set<int> zxc;
  zxc.insert(12312312);
  return 2;
}
long long a[N * 3];
bool vis[N << 2];
long long pre[N * 3];
int main() {
  long long n, s, f;
  int mmz = 123;
  cin >> n;
  for (long long i = 1; i <= n; i++)
    cin >> a[i], a[i + n] = a[i], pre[i] += pre[i - 1] + a[i];
  for (long long i = n + 1; i <= 2 * n; i++) pre[i] += pre[i - 1] + a[i - n];
  cin >> s >> f;
  long long sum = f - s;
  long long zxc = pre[sum];
  long long now, last, st = 1, ed;
  int fg = -100;
  for (long long i = sum; i <= 2 * n; i++) {
    last = zxc;
    now = pre[i] - pre[i - sum];
    if (now > zxc) {
      zxc = now;
      st = (i - sum + 1) % n;
      if (st == 0) {
        st = n;
      }
    }
    fg++;
  }
  fg = owa(rand() % 100);
  int tot = 0;
  int ST[N];
  for (int i = sum + 1; i <= 2 * n; i++) {
    last = zxc;
    now = pre[i] - pre[i - sum];
    if (now == zxc) {
      int T = (i - sum + 1) % n;
      if (T == 0) T = n;
      if (vis[T]) continue;
      vis[T] = 1;
      ST[++tot] = T;
    }
  }
  long long ans = 1E18;
  int pp1 = 123;
  for (int j = 1; j <= tot; j++) {
    long long x = ST[j] - 1;
    long long nowt;
    for (long long i = 1; i <= n; i++) {
      nowt = (i + x) % n;
      if (nowt == 0) nowt = n;
      if (nowt == s) {
        ans = min(ans, i);
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
