#include <bits/stdc++.h>
using namespace std;
int a[200000];
int p[200000];
int ran(int from, int to) { return p[to] - (from == 0 ? 0 : p[from - 1]); }
int main() {
  ios_base::sync_with_stdio(false);
  int n, s, f;
  cin >> n;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  for (int i = 0; i < 2 * n; i++) {
    sum += a[i];
    p[i] = sum;
  }
  cin >> s >> f;
  f--;
  int maxiv = 0;
  vector<int> mh;
  for (int i = 0; i < n; i++) {
    int ez = ran(i, i + f - s);
    if (maxiv < ez) {
      maxiv = ez;
      mh.resize(0);
      mh.push_back(i);
    } else if (maxiv == ez) {
      mh.push_back(i);
    }
  }
  for (int i = 0; i < mh.size(); i++) {
    mh[i] = (s - mh[i] + n) % n;
    if (mh[i] == 0) {
      mh[i] = n;
    }
  }
  sort(mh.begin(), mh.end());
  cout << mh[0] << endl;
  return 0;
}
