#include <bits/stdc++.h>
using namespace std;
int dp[200200];
int n;
int a[200200];
int maxi;
int s, f;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[n + i] = a[i];
  }
  dp[1] = a[1];
  for (int i = 2; i <= 2 * n; i++) {
    dp[i] = dp[i - 1] + a[i];
  }
  maxi = 0;
  cin >> s >> f;
  int pos;
  for (int i = 1; i <= n; i++) {
    int s1 = n + s - i, f1 = n + f - i;
    if (dp[f1] - dp[s1] > maxi) {
      maxi = dp[f1] - dp[s1];
      pos = i;
    }
  }
  cout << pos;
  return 0;
}
