#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double EPS = 1e-9;
const int inf = 1e9;
const double PI = 3.1415926535897932384626433832795;
const int N = 1 * 1e5 + 5;
int mas[3 * N];
long long sum[3 * N];
int main() {
  ios_base::sync_with_stdio(0);
  int n, s, f;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> mas[i];
  }
  cin >> s >> f;
  int len = f - s;
  for (int i = n; i < 3 * n; i++) {
    mas[i] = mas[i % n];
  }
  sum[0] = mas[0];
  for (int i = 1; i < 3 * n; i++) {
    sum[i] = sum[i - 1] + mas[i];
  }
  long long mx = 0, ans = inf;
  for (int i = 2 * n, k = s; i > 0; i--, k++) {
    if (mx < sum[i + len - 1] - sum[i - 1]) {
      mx = sum[i + len - 1] - sum[i - 1];
    }
  }
  for (int i = 2 * n, k = s; i > 0; i--, k++) {
    if (mx == sum[i + len - 1] - sum[i - 1]) {
      if (k > n) k -= n;
      ans = min(ans, (long long)k);
    }
  }
  cout << ans;
  return 0;
}
