#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int s, f;
  cin >> s >> f;
  int hours = f - s;
  vector<int> pre(n + hours + 1, 0);
  pre[0] = v[0];
  for (int i = 0; i < hours; i++) {
    v.push_back(v[i]);
  }
  for (int i = 1; i < n + hours; i++) {
    pre[i] += pre[i - 1] + v[i];
  }
  int ans = INT_MIN;
  int index;
  for (int i = 0; i < n; i++) {
    int val = pre[i + hours - 1] - (i > 0 ? pre[i - 1] : 0);
    if (val > ans) {
      ans = val;
      index = i + 1;
    }
  }
  int actual = INT_MAX;
  for (int i = 0; i < n; i++) {
    int val = pre[i + hours - 1] - (i > 0 ? pre[i - 1] : 0);
    if (val == ans) {
      ans = val;
      index = i + 1;
      if (index == s) {
        actual = min(index, actual);
      } else if (index > s) {
        int temp = (n + s) - (index - 1);
        actual = min(temp, actual);
      } else {
        actual = min(s - index + 1, actual);
      }
    }
  }
  cout << actual;
  return 0;
}
