#include <bits/stdc++.h>
using namespace std;
const int maxN = 2 * 1e5 + 9;
const int MOD = 1e9 + 7;
const double epsilon = 1e-8;
bool equal(double a, double b) {
  a = b - a;
  return fabs(a) <= epsilon;
}
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) {
    return a.second > b.second;
  }
  return a.first > b.first;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, a[maxN], pre[maxN], s, e;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  cin >> s >> e;
  pre[1] = a[1];
  for (int i = 2; i <= 2 * n; i++) {
    pre[i] = a[i] + pre[i - 1];
  }
  int best = 0, id;
  e--;
  for (int i = 1; i <= n; i++) {
    int val = pre[n + e - i + 1] - pre[n + s - 1 - i + 1];
    if (val > best) {
      best = val;
      id = i;
    }
  }
  cout << id << endl;
  return 0;
}
