#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100000 + 5;
long long A[MAXN];
long long T[MAXN];
long long n, s, f;
long long F[MAXN * 2];
void cal() {
  long long ans = 0, id = 0;
  for (long long i = 1; i < 2 * n; ++i) {
    if (ans < F[i + f - s - 1] - F[i - 1]) {
      ans = F[i + f - s - 1] - F[i - 1];
      id = s - i + 1;
      while (id <= 0) id += n;
      while (id > n) id -= n;
    } else if (ans == F[i + f - s - 1] - F[i - 1]) {
      long long idd = s - i + 1;
      while (idd <= 0) idd += n;
      while (idd > n) idd -= n;
      if (idd < id) id = idd;
    }
  }
  cout << id << endl;
}
int main() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> A[i];
    F[i] = F[i - 1] + A[i];
  }
  for (long long i = n + 1; i < 2 * n; ++i) {
    F[i] = F[i - 1] + A[i - n];
  }
  cin >> s >> f;
  cal();
  return 0;
}
