#include <bits/stdc++.h>
const int maxn = 200010;
using namespace std;
int n, a[maxn], s, f, m, b, k;
int main() {
  cin >> n;
  b = n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  cin >> s >> f;
  for (int i = 1; i <= 2 * n; ++i) a[i] += a[i - 1];
  for (int i = 1; i <= n; ++i) {
    if (m < a[b + f - 1] - a[b + s - 1]) {
      m = a[b + f - 1] - a[b + s - 1];
      k = i;
    }
    b--;
  }
  cout << k << endl;
  return 0;
}
