#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
const int maxm = 100005;
const int mod = 100000000;
int n;
int a[maxn];
int beg, endd;
int ans1, ans2, ans3;
int cal(int num) {
  int ans = beg - 1 - ((num - 1) % n);
  if (ans < 0) ans += n;
  ans++;
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  scanf("%d%d", &beg, &endd);
  int len = endd - beg;
  ans1 = 1;
  ans2 = 0;
  for (int i = 1; i <= len; i++) ans2 += a[i];
  int cnt = ans2;
  for (int i = 2; i <= n; i++) {
    cnt -= a[i - 1];
    cnt += a[((i + len - 1) - 1) % n + 1];
    if (cnt > ans2) {
      ans2 = cnt;
      ans1 = i;
    } else if (cnt == ans2) {
      if (cal(i) < cal(ans1)) {
        ans1 = i;
      }
    }
  }
  cout << cal(ans1) << endl;
  return 0;
}
