#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long n, i, lg, st, dr, maxi, poz, sum, timp, taux, loc1, loc2;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  cin >> st >> dr;
  lg = dr - st;
  for (i = 1; i <= lg; i++) sum = sum + a[i];
  maxi = sum;
  poz = 1;
  timp = st;
  for (i = lg + 1; i <= n + lg - 1; i++) {
    loc1 = i - lg + 1;
    loc2 = i;
    if (i > n) loc2 = i - n;
    sum = sum + a[loc2] - a[loc1 - 1];
    if (sum > maxi) {
      maxi = sum;
      timp = st - loc1 + 1;
      if (timp < 1) timp = timp + n;
    }
    if (sum == maxi) {
      poz = loc1 - lg + 1;
      taux = st - loc1 + 1;
      if (taux < 1) taux = taux + n;
      if (taux < timp) timp = taux;
    }
  }
  cout << timp;
  return 0;
}
