#include <bits/stdc++.h>
using ll = long long int;
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n + 1];
  memset(arr, 0, sizeof(arr));
  for (int i = 1; i < n + 1; i += 1) cin >> arr[i];
  int s, f;
  cin >> s >> f;
  ll sum = 0;
  ll t = 0;
  int start = s, finish = f;
  for (int i = 1; i <= n; i++) arr[i] += arr[i - 1];
  for (int time = 1; time <= n; time++) {
    ll q = 0;
    if (s < f) {
      q = arr[f - 1] - arr[s - 1];
    } else {
      q = arr[n] - arr[s - 1] + arr[f - 1];
    }
    if (q > sum) {
      sum = q;
      t = time;
    }
    s--;
    f--;
    if (s == 0) s = n;
    if (f == 0) f = n;
  }
  cout << t << endl;
  return 0;
}
