#include <bits/stdc++.h>
using namespace std;
const int maxN = 100000 + 5;
int n;
int a[maxN];
int s, f;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cin >> s >> f;
  int start_time = s;
  int sum = 0;
  for (int i = 1; i <= f - s; i++) sum += a[i];
  int max_sum = sum;
  int l = 1, r = f - s;
  for (int i = 2; i <= n; i++) {
    sum -= a[l];
    l++;
    r++;
    if (r > n) r = 1;
    sum += a[r];
    if (sum > max_sum) {
      max_sum = sum;
      start_time = s - i + 1;
      if (start_time <= 0) start_time += n;
    }
    if (sum == max_sum) {
      int cur_time = s - i + 1;
      if (cur_time <= 0) cur_time += n;
      start_time = min(start_time, cur_time);
    }
  }
  cout << start_time;
  return 0;
}
