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