#include <bits/stdc++.h>
#pragma GCC optimize("omit-frame-pointer")
#pragma GCC optimize("unroll-loops")
using namespace std;
string itosm(long long x) {
  if (x == 0) return "0";
  string ans = "";
  while (x > 0) {
    ans += ((x % 10) + '0');
    x /= 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
long long stoim(string str) {
  long long ans = 0;
  long long k = 1;
  for (int i = str.length() - 1; i >= 0; i--) {
    ans += (str[i] - '0') * k;
    k *= 10;
  }
  return ans;
}
const long long infll = 1e18 + 3;
const int inf = 1009000999;
const double eps = 1e-7;
const int maxn = 2e6 + 46;
const int baseint = 1000200013;
const long long basell = 1e18 + 3;
const long double PI = acos(-1.0);
const long long mod = 1e9 + 7;
int a[maxn];
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int s, f;
  cin >> s >> f;
  for (int i = n; i < 2 * n; i++) a[i] = a[i - n];
  int t = s;
  int anssum = 0, ans = 0;
  int sum = 0, l = 0;
  for (int i = 0; i + s < f; i++) sum += a[i];
  for (int i = f - s; i <= n * 2; i++) {
    if (sum > anssum || anssum == sum && ans > t) {
      anssum = sum;
      ans = t;
    }
    sum += a[i];
    sum -= a[l];
    l++;
    t--;
    if (!t) t = n;
  }
  cout << ans;
}
int main() {
  srand(time(0));
  ios_base::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
