#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int a[3 * n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    a[i + n] = a[i];
    a[i + 2 * n] = a[i];
  }
  int s, f;
  cin >> s >> f;
  int dur = f - s;
  long long int ans = 0;
  long long int final;
  for (int i = 0; i < dur; i++) {
    ans += a[i];
  }
  final = ans;
  int pos = s;
  for (int i = 0; i < n; i++) {
    ans -= a[i];
    ans += a[i + dur];
    if (final < ans) {
      final = max(final, ans);
      int val = s;
      int one = (i + 1) - s + 1;
      if (one <= 0) {
        pos = s - (i + 1);
      } else {
        int nat = one - 1;
        pos = n - (nat);
      }
    }
    if (final == ans) {
      int val = s;
      int one = (i + 1) - s + 1;
      if (one <= 0) {
        pos = min(pos, s - (i + 1));
      } else {
        int nat = one - 1;
        pos = min(pos, n - (nat));
      }
    }
  }
  cout << pos << '\n';
  return 0;
}
