#include <bits/stdc++.h>
using namespace std;
vector<long long> v, dp;
int n, s, f;
int getSum(int l, int r) { return dp[r + 1] - dp[l]; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long ans, maxi;
  while (cin >> n) {
    v = vector<long long>(n);
    dp = vector<long long>(n + 1, 0);
    for (int i = 0; i < n; i++) {
      cin >> v[i];
      dp[i + 1] = dp[i] + v[i];
    }
    cin >> s >> f;
    s--;
    f -= 2;
    maxi = 0;
    ans = -1;
    for (int i = 0; i < n; i++) {
      long long cand;
      if (s <= f)
        cand = getSum(s, f);
      else
        cand = getSum(0, f) + getSum(s, n - 1);
      s--;
      f--;
      if (s < 0) s = n - 1;
      if (f < 0) f = n - 1;
      if (cand > maxi) {
        maxi = cand;
        ans = i;
      }
    }
    cout << ans + 1 << '\n';
  }
  return 0;
}
