#include <bits/stdc++.h>
using namespace std;
int arr[100500];
int simpen[100500];
int prin[100500];
int main() {
  int n, start, end, lama, idx, temp = 0, con = 0, cnt = 0, head, tail, gede;
  vector<int> p;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  cin >> start >> end;
  lama = end - start;
  while (1) {
    if (con == 0) {
      for (int i = 0; i < lama; i++) {
        temp += arr[i];
      }
      simpen[cnt] = temp;
      con = 1;
      head = 0;
      tail = lama - 1;
      cnt++;
    } else {
      tail++;
      if (tail == n) tail = 0;
      temp -= arr[head];
      head++;
      if (head == n) head = 0;
      temp += arr[tail];
      simpen[cnt] = temp;
      cnt++;
      if (cnt == n) break;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      gede = simpen[i];
      idx = i;
    } else {
      if (simpen[i] > gede) {
        gede = simpen[i];
        idx = i;
      }
    }
  }
  cnt = 0;
  for (int i = 0; i < n; i++) {
    if (simpen[i] == gede) {
      prin[cnt] = start + (n - i);
      if (prin[cnt] > n) prin[cnt] %= n;
      cnt++;
    }
  }
  sort(prin, prin + cnt);
  cout << prin[0];
}
