#include <bits/stdc++.h>
using namespace std;
int ans[100010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ans[i]);
  }
  ans[0] = ans[n];
  int s, f;
  int result = 0;
  scanf("%d%d", &s, &f);
  for (int i = s; i < f; i++) {
    result += ans[i];
  }
  int mx = result;
  int x = 1;
  for (int i = 1; i < n; i++) {
    int l = (s - i + n) % n;
    int r = (f - i + n) % n;
    result = result + ans[l] - ans[r];
    if (result > mx) {
      mx = result;
      x = i + 1;
    }
  }
  printf("%d\n", x);
  return 0;
}
