#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = LONG_LONG_MAX;
void setup() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
signed main() {
  setup();
  long long n;
  cin >> n;
  long long a[n + 1], sum[n + 1];
  memset(sum, 0, sizeof(sum));
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long s, f;
  cin >> s >> f;
  long long l = f - s;
  for (long long i = 1; i <= l; i++) {
    sum[1] += a[i];
  }
  for (long long i = 1; i < n; i++) {
    sum[i + 1] = sum[i] + a[(i + l - 1) % n + 1] - a[i];
  }
  long long minans = 1e9 + 7;
  long long choose = *max_element(sum + 1, sum + n + 1);
  for (long long i = 1; i <= n; i++) {
    if (sum[i] == choose) {
      minans = min(minans, (s - i + n) % n + 1);
    }
  }
  cout << minans;
  return 0;
}
