#include <bits/stdc++.h>
using namespace std;
int t[100005];
int main() {
  int n, s, f, total, one, maxi;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t[i]);
  }
  total = 0;
  scanf("%d%d", &s, &f);
  for (int i = 0; i < f - s; i++) {
    total += t[i];
  }
  one = 0;
  maxi = total;
  for (int i = 1; i < n; i++) {
    total -= t[i - 1];
    total += t[(i - 1 + f - s) % n];
    if (total > maxi) {
      one = i;
      maxi = total;
    } else if (total == maxi) {
      if ((n - one + s - 1) % n + 1 > (n - i + s - 1) % n + 1) {
        one = i;
      }
    }
  }
  printf("%d\n", (n - one + s - 1) % n + 1);
  return 0;
}
