#include <bits/stdc++.h>
using namespace std;
int m[100005], n;
int main() {
  int s, f, k = 1;
  long long int ans = 0, total = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> m[i];
  }
  cin >> s >> f;
  f = f - 1;
  for (int j = s; j <= f; j++) {
    total += m[j];
  }
  for (int i = 1; i <= n; i++) {
    if (total > ans) {
      ans = total;
      k = i;
    }
    total -= m[f];
    s--;
    f--;
    if (s == 0) s = n;
    if (f == 0) f = n;
    total += m[s];
  }
  cout << k;
  return 0;
}
