#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int s, f;
  cin >> s >> f;
  int kol = f - s;
  int sum = 0;
  for (int i = 0; i < kol; i++) {
    sum += a[i];
  }
  int mx = sum;
  int ans = s;
  int l = 0;
  int r = kol - 1;
  for (int i = 1; i < n; i++) {
    l++;
    r++;
    if (r == n) {
      r = 0;
    }
    sum -= a[l - 1];
    sum += a[r];
    if (sum >= mx) {
      int new_ans = s - i;
      if (new_ans <= 0) {
        new_ans += n;
      }
      if (sum > mx) {
        ans = new_ans;
        mx = sum;
      } else {
        ans = min(ans, new_ans);
      }
    }
  }
  cout << ans << endl;
}
