#include <bits/stdc++.h>
using namespace std;
int n, s, f;
int m;
long long a[2 * 100005];
long long duc = 1e10;
inline long long get(long long pos) {
  if (pos <= s)
    return s - pos + 1;
  else {
    return n - pos + s + 1;
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  cin >> s >> f;
  m = f - s;
  long long ans = 0;
  long long now = 0;
  for (int i = 1; i <= m; i++) {
    now += a[i];
  }
  ans = now;
  long long opt = 1;
  int l = 1, r = m;
  while (l <= n) {
    now -= a[l];
    now += a[r + 1];
    if (ans <= now) {
      if (ans < now)
        duc = get(l + 1);
      else
        duc = min(duc, get(l + 1));
      ans = now;
    }
    l++;
    r++;
  }
  cout << duc;
}
