#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int s, f;
  cin >> s >> f;
  int t = f - s;
  int peo = 0;
  for (int i = 1; i <= t; i++) {
    peo += a[i];
  }
  int b[n + 1];
  b[1] = peo;
  for (int i = 2; i <= n; i++) {
    int m = (i + t - 1) % n;
    if (m == 0) {
      m = n;
    }
    b[i] = b[i - 1] - a[i - 1] + a[m];
  }
  int m = 1;
  for (int i = 1; i <= n; i++) {
    if (b[i] > b[m]) {
      m = i;
    }
  }
  int ans = n + 2;
  for (int i = 1; i <= n; i++) {
    if (b[i] == b[m]) {
      int k = s - i + 1;
      if (k <= 0) {
        k += n;
      }
      if (k < ans) {
        ans = k;
      }
    }
  }
  cout << ans;
}
