#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t n;
  vector<int64_t> a;
  cin >> n;
  for (int64_t i = 0; i < n; i++) {
    int64_t a_i;
    cin >> a_i;
    a.push_back(a_i);
  }
  int64_t s, f;
  cin >> s >> f;
  s--;
  f--;
  int64_t sum = 0;
  for (int64_t i = s; i < f; i++) {
    sum += a[i];
  }
  int64_t best_h = 0;
  int64_t best_sum = sum;
  for (int64_t h = 1; h < n; h++) {
    sum += a[(s - h + n) % n];
    sum -= a[(f - h + n) % n];
    if (sum > best_sum) {
      best_sum = sum;
      best_h = h;
    }
  }
  cout << (best_h + 1) << endl;
}
