#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, s, f, h, co = 0, sum, savesum, res, re, savere;
  cin >> n;
  long long a[n + 1];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cin >> s >> f;
  h = f - s;
  queue<long long> qu;
  i = 1;
  sum = 0;
  savesum = 0;
  res = 1;
  for (i = 1; i <= h; i++) {
    qu.push(a[i]);
    sum += a[i];
    savesum = sum;
  }
  re = s;
  savere = s;
  for (i = h + 1; i <= n; i++) {
    sum += a[i] - qu.front();
    qu.pop();
    qu.push(a[i]);
    if (sum > savesum) {
      res = i - h + 1;
      savesum = sum;
      re = s - res + 1;
      if (re < 1) re += n;
      savere = re;
    } else if (sum == savesum) {
      res = i - h + 1;
      savesum = sum;
      re = s - res + 1;
      if (re < 1) re += n;
      if (savere > re) savere = re;
    }
  }
  for (i = 1; i <= h; i++) {
    sum += a[i] - qu.front();
    qu.pop();
    qu.push(a[i]);
    if (sum > savesum) {
      savesum = sum;
      res = n - h + 1 + i;
      re = s - res + 1;
      if (re < 1) re += n;
      savere = re;
    } else if (sum == savesum) {
      res = n - h + 1 + i;
      re = s - res + 1;
      if (re < 1) re += n;
      if (savere > re) savere = re;
    }
  }
  cout << savere;
  return 0;
}
