#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
long long a[maxn];
int main() {
  long long n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long s, f;
  cin >> s >> f;
  f = f - s;
  long long ans = 0, ind = 1;
  vector<int> v;
  v.push_back(1);
  for (int i = 1; i <= f; i++) ans += a[i];
  long long temp = ans;
  for (int i = f + 1; i <= n; i++) {
    temp += a[i] - a[i - f];
    if (ans == temp) v.push_back(i - f + 1);
    if (ans < temp) {
      temp = ans;
      v.clear();
      v.push_back(i - f + 1);
    }
  }
  for (int i = n - f + 1; i < n; i++) {
    temp += a[i - n + f] - a[i];
    if (ans == temp) v.push_back(i + 1);
    if (ans < temp) {
      temp = ans;
      v.clear();
      v.push_back(i + 1);
    }
  }
  int maxx = n;
  for (int i : v) {
    int temp = s - i + 1;
    if (temp <= 0) temp += n;
    maxx = min(maxx, temp);
  }
  cout << maxx;
}
