#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
double lg(double a) { return (log(a) / log(10.0)); }
const long long N = 111111;
long long n, a[N], sum[N], s, f;
long long st, smax = -1, m = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  cin >> s >> f;
  for (int i = 1; i <= n; i++) {
    long long tmps = s - i + 1, tmpf = f - i;
    while (tmps < 1) {
      tmps += n;
      tmpf += n;
    }
    if (tmpf <= n)
      st = sum[tmpf] - sum[tmps - 1];
    else
      st = sum[n] - sum[tmps - 1] + sum[tmpf - n];
    if (st > smax) {
      smax = st;
      m = i;
    }
  }
  cout << m << endl;
}
