#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  int n;
  cin >> n;
  vi a(n);
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    cin >> a[i];
  }
  int s, f;
  cin >> s >> f;
  --s;
  --f;
  vi sm(n * 3 + 1);
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    int j = n - i;
    for (int k = j; k <= j + n; k += n) {
      sm[s + k] += a[i];
      sm[f + k] -= a[i];
    }
  }
  int ma = -1, ans = INT_MAX;
  for (int(i) = (0); (i) < (int)(3 * n); ++(i)) {
    assert(sm[i] >= 0);
    if (ma <= sm[i]) {
      int x = i;
      x %= n;
      if (ma < sm[i] || x < ans) ans = x;
      ma = sm[i];
    }
    sm[i + 1] += sm[i];
  }
  cout << ans + 1 << endl;
}
