#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int x[200005], sum[200005];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i];
  int a, b;
  cin >> a >> b;
  for (int i = 1; i <= n + n; i++) sum[i] = sum[i - 1] + x[(i > n ? i - n : i)];
  int res = 0, time = 0, l = a, r = b - 1;
  for (int i = 1; i <= n; i++) {
    int cnt;
    if (l > r)
      cnt = sum[n] - sum[l - 1] + sum[r];
    else
      cnt = sum[r] - sum[l - 1];
    l--, r--;
    if (l <= 0) l = n;
    if (r <= 0) r = n;
    if (cnt > res) {
      res = cnt;
      time = i;
    }
  }
  cout << time;
  return 0;
}
