#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], suff[100005], s, f;
int main() {
  cin.tie(0), cout.tie(0), ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    suff[i] = a[i];
  }
  cin >> s >> f;
  f--;
  for (int i = 1; i <= n; i++) suff[i] += suff[i - 1];
  long long dist, dist1, max1 = 0, it;
  for (int i = 1; i <= n; i++) {
    if (i <= s) {
      dist = s - i + 1;
    } else {
      dist = (n - i) + 1 + s;
    }
    if (i <= f) {
      dist1 = f - i + 1;
    } else {
      dist1 = (n - i) + 1 + f;
    }
    if (dist <= dist1) {
      if (suff[dist1] - suff[dist - 1] > max1) {
        it = i;
        max1 = max(max1, suff[dist1] - suff[dist - 1]);
      }
    } else {
      if (suff[n] - suff[dist - 1] + suff[dist1] > max1) {
        it = i;
        max1 = max(max1, suff[n] - suff[dist - 1] + suff[dist1]);
      }
    }
  }
  cout << it;
}
