#include <bits/stdc++.h>
using namespace std;
map<int, int> s;
int dp[55];
vector<long long> ii;
vector<pair<long long, long long>> t;
int main() {
  int g;
  cin >> g;
  int arr[g];
  for (int i = 0; i < g; i++) {
    cin >> arr[i];
  }
  int a, b;
  cin >> a >> b;
  a--;
  b--;
  int sum = 0;
  for (int i = a; i < b; i++) {
    sum += arr[i];
  }
  int mx = sum, ans = 1;
  for (int i = 1; i < g; i++) {
    sum += arr[(a - i + g) % g] - arr[(b - i + g) % g];
    if (sum > mx) {
      mx = sum;
      ans = i + 1;
    }
  }
  cout << ans;
}
