#include <bits/stdc++.h>
using namespace std;
static long long pref[200005];
int main() {
  int n;
  scanf("%d", &n);
  static int a[200005];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    pref[i] = a[i];
    if (i > 0) pref[i] += pref[i - 1];
  }
  int s, e;
  scanf("%d %d", &s, &e);
  e--;
  long long ans = 0;
  int beg = 1;
  for (int i = 1; i <= n; i++) {
    long long now;
    if (i >= s && i <= e) {
      int diff = e - i;
      int rem = (e - s + 1) - (diff + 1);
      now = pref[diff];
      if (rem > 0) {
        now += pref[n - 1] - pref[n - 1 - rem];
      }
      if (ans < now) {
        ans = now;
        beg = i;
      }
    } else if (i < s) {
      int from = s - i;
      now = pref[e - s + from];
      now -= pref[from - 1];
      if (ans < now) {
        ans = now;
        beg = i;
      }
    } else if (i > e) {
      int from = n - i + s;
      now = pref[e - s + from];
      now -= pref[from - 1];
      if (ans < now) {
        ans = now;
        beg = i;
      }
    } else {
      assert(0);
    }
  }
  printf("%d\n", beg);
  return 0;
}
