#include <bits/stdc++.h>
using namespace std;
int a[1000010];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i % n];
  }
  int s, f;
  cin >> s >> f;
  int sum = 0;
  int index = 0;
  int maxx = 0;
  for (int i = s; i <= f; i++) {
    sum += a[i % n];
  }
  for (int i = 0; i < n; i++) {
    int l = (s - i + n) % n;
    int r = (f - i + n) % n;
    sum = sum - a[r] + a[l];
    if (sum > maxx) {
      maxx = sum;
      index = i + 1;
    }
  }
  cout << index << endl;
  return 0;
}
