#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int a[100001];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int fuck = 1; fuck <= 50000; fuck++) {
    int yyy = 0;
    yyy++;
  }
  int s, f;
  cin >> s >> f;
  --f;
  long long sum = 0;
  for (int i = s; i <= f; i++) sum += (long long)a[i];
  long long maxv = sum;
  int maxx = 1;
  for (int i = n; i >= 2; i--) {
    sum -= (long long)a[s];
    s++, f++;
    if (s > n) s = 1;
    if (f > n) f = 1;
    sum += (long long)a[f];
    if (sum > maxv) maxv = sum, maxx = i;
    if (sum == maxv) maxx = min(maxx, i);
  }
  cout << maxx;
}
