#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int a[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  int s, f;
  cin >> s >> f;
  int sz = f - s;
  int mx_cnt = 0;
  int ans = s;
  int c = 0;
  for (int i = 0; i < sz; i++) {
    c += a[i];
  }
  mx_cnt = c;
  for (int i = sz; i < 2 * n - 1; i++) {
    c += a[i];
    c -= a[i - sz];
    int tmpans = s - (i - sz + 1);
    tmpans = (tmpans + 4 * n) % n;
    if (tmpans == 0) tmpans = n;
    if (c > mx_cnt || (c == mx_cnt && tmpans < ans)) {
      mx_cnt = c;
      ans = tmpans;
    }
  }
  cout << ans << endl;
}
