#include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 100000;
long long a[10 + 2 * MAX_N];
long long sp[10 + 2 * MAX_N];
int main() {
  long long n, s, f;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  for (long long i = 1; i <= 2 * n; i++) {
    sp[i] += a[i] + sp[i - 1];
  }
  cin >> s >> f;
  long long myMax = -2000000000;
  long long h = 0;
  for (long long i = 1; i <= n; i++) {
    if (sp[i + f - s - 1] - sp[i - 1] >= myMax) {
      bool egal;
      egal = false;
      if (sp[i + f - s - 1] - sp[i - 1] == myMax) egal = true;
      myMax = sp[i + f - s - 1] - sp[i - 1];
      long long c = LLONG_MAX;
      if (egal) {
        c = h;
      }
      if (s - i + 1 < 0) {
        h = n + (s - i + 1);
      } else {
        h = s - i + 1;
      }
      if (h == 0) h = n;
      h = min(h, c);
    }
  }
  cout << h << "\n";
  return 0;
}
