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