#include <bits/stdc++.h>
using namespace std;
int n;
void add(int &x, int y, int mod) {
  x += y;
  if (x >= mod)
    x -= mod;
  else if (x < 0)
    x += mod;
}
void normalize(int &x, int mod) {
  if (x >= mod)
    x -= mod;
  else if (x < 0)
    x += mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie();
  cin >> n;
  vector<long long int> dp(2 * n + 1);
  for (int i = 1; i <= n; ++i) {
    cin >> dp[i];
    dp[i + n] = dp[i];
  }
  for (int i = 1; i <= 2 * n; ++i) dp[i] += dp[i - 1];
  int a, b;
  cin >> a >> b;
  int k = b - a;
  long long int mx = 0;
  int ans = -1;
  for (int i = k; i < n + k; ++i) {
    long long int cur = dp[i] - dp[i - k];
    if (cur > mx) {
      mx = cur;
      ans = i - k + 1;
    } else if (cur == mx) {
      int local = i - k + 1;
      int delta1 = a - ans;
      int delta2 = a - local;
      ++delta1, ++delta2;
      normalize(delta1, n);
      normalize(delta2, n);
      if (delta1 == 0) delta1 = n;
      if (delta2 == 0) delta2 = n;
      if (delta1 > delta2) ans = local;
    }
  }
  int delta1 = a - ans;
  ++delta1;
  normalize(delta1, n);
  if (delta1 == 0) delta1 = n;
  cout << delta1 << '\n';
  return 0;
}
