#include <bits/stdc++.h>
using namespace std;
long long a[200005];
int main() {
  long long n, s, f;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  cin >> s >> f;
  long long len = f - s, l = 1, r = 1, sum = 0, x = 1e9, ans = 0;
  while (r >= l && r <= 2 * n) {
    while (r - l + 1 <= len && r <= 2 * n) {
      sum += a[r++];
    }
    if (ans < sum) {
      ans = sum;
      x = (n + s - l + n) % n + 1;
    }
    if (ans == sum) {
      x = min(x, (n + s - l + n) % n + (long long)1);
    }
    sum -= a[l++];
  }
  cout << x << endl;
}
