#include <bits/stdc++.h>
using namespace std;
template <typename T, typename L>
bool smax(T &x, L y) {
  return x < y ? (x = y, true) : false;
}
template <typename T, typename L>
bool smin(T &x, L y) {
  return y < x ? (x = y, true) : false;
}
const int MAXN = 1e5 + 15;
int ps[MAXN];
int s, f;
int n;
int a[MAXN];
pair<int, int> mem;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cerr << "HELLO WORLD :)\n";
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cin >> s >> f;
  for (int i = 1; i <= n; i++) ps[i] = ps[i - 1] + a[i];
  int len = f - s - 1;
  for (int i = 1; i <= n; i++) {
    int st = s - i + 1;
    if (st >= 1) {
      if (st + len <= n) {
        if (smax(mem.first, ps[st + len] - ps[st - 1])) mem.second = i;
      } else if (smax(mem.first, ps[n] - ps[st - 1] + ps[(st + len) % n]))
        mem.second = i;
    } else {
      st = n - i + s + 1;
      if (st + len <= n) {
        if (smax(mem.first, ps[st + len] - ps[st - 1])) mem.second = i;
      } else {
        if (smax(mem.first, ps[n] - ps[st - 1] + ps[(st + len) % n]))
          mem.second = i;
      }
    }
  }
  return cout << mem.second << '\n', false;
}
