#include <bits/stdc++.h>
using namespace std;
int a[123456], b[123456];
int n, s, f;
void insert(int x, int y, int v) {
  b[x] += v;
  b[y] -= v;
}
void solve() {
  int i, k = 0;
  for (i = 0; i < n; i++) {
    b[i] = 0;
    scanf("%d", &a[i]);
  }
  b[n] = 0;
  scanf("%d %d", &s, &f);
  int x = s, y = f;
  for (i = 0; i < n; i++) {
    x = s - i;
    y = f - i;
    if (y <= 0) {
      x += n;
      y += n;
    }
    if (x > 0) {
      insert(x, y, a[i]);
    } else {
      insert(x + n, n + 1, a[i]);
      insert(1, y, a[i]);
    }
  }
  x = y = 0;
  for (i = 1; i <= n; i++) {
    x += b[i];
    if (x > y) {
      y = x;
      k = i;
    }
  }
  printf("%d\n", k);
}
int main() {
  while (scanf("%d", &n) != EOF) {
    solve();
  }
  return 0;
}
