#include <bits/stdc++.h>
using namespace std;
int n, a[200010], s, f, mx, sum, ans;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[n + i];
  for (int i = 0; i < n; i++) a[i] = a[n + i];
  cin >> s >> f;
  for (int i = 0; i < f - 1; i++) sum += a[n + i];
  s += n - 1;
  f += n - 1;
  for (int i = 0; i < n; i++) {
    if (sum > mx) {
      mx = sum;
      ans = i + 1;
    }
    sum += -a[--f] + a[--s];
  }
  cout << ans << endl;
  return 0;
}
