#include <bits/stdc++.h>
using namespace std;
template <typename T>
T modpow(T base, T exp, T modulus) {
  base %= modulus;
  T result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % modulus;
    base = (base * base) % modulus;
    exp >>= 1;
  }
  return result;
}
const int N = 1e5 + 7;
int a[N];
int sum[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  memset(sum, 0, sizeof(sum));
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  int s, f;
  cin >> s >> f;
  int ans = 0;
  int idx = -1;
  for (int i = 1; i <= n; i++) {
    int idx1 = (n - i + s + 1) % n;
    if (!idx1) idx1 = n;
    int idx2 = (n - i + f) % n;
    if (!idx2) idx2 = n;
    int val;
    if (idx1 > idx2) {
      val = sum[n] - sum[idx1 - 1];
      val += sum[idx2];
    } else
      val = sum[idx2] - sum[idx1 - 1];
    if (ans < val) {
      ans = val;
      idx = i;
    }
  }
  cout << idx << endl;
  return 0;
}
