#include <bits/stdc++.h>
using namespace std;
void optimize() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
long long s[100001], st, n;
long long timp(long long x) {
  if (st < x)
    return n - x + st + 1;
  else
    return st - x + 1;
}
int main() {
  optimize();
  long long i, f, m = 0, r;
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> s[i], s[i] += s[i - 1];
  cin >> st >> f;
  f -= st;
  for (i = 1; i <= n; ++i) {
    if (i >= f) {
      if (s[i] - s[i - f] > m)
        m = s[i] - s[i - f], r = timp(i - f + 1);
      else if (s[i] - s[i - f] == m && timp(i - f + 1) < r)
        r = timp(i - f + 1);
    } else {
      if (s[i] + s[n] - s[n - (f - i)] > m)
        m = s[i] + s[n] - s[n - (f - i)], r = timp(n - (f - i) + 1);
      else if (s[i] + s[n] - s[n - (f - i)] == m && timp(n - (f - i) + 1) < r)
        r = timp(n - (f - i) + 1);
    }
  }
  cout << r;
  return 0;
}
