#include <bits/stdc++.h>
using namespace std;
const int inf = 1e5 + 9;
int n, a[inf], s, e, mx = -1, id = 1e9 + 9, par[inf + inf], diff;
int time(int x) {
  int temp = s - x + 1;
  if (temp <= 0) temp += n;
  return temp;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], par[i] = par[i - 1] + a[i];
  cin >> s >> e;
  diff = e - s;
  for (int i = n + 1; i <= n + n; i++) par[i] = par[i - 1] + a[i - n];
  for (int i = diff; i <= n + diff - 1; i++)
    if (par[i] - par[i - diff] > mx)
      mx = par[i] - par[i - diff], id = time(i - diff + 1);
    else if (par[i] - par[i - diff] == mx)
      id = min(id, time(i - diff + 1));
  cout << id << endl;
}
