#include <bits/stdc++.h>
using namespace std;
char BUFF[1024 * 1024], *Head = NULL, *Tail = NULL;
inline char GetChar() {
  if (Head == Tail) {
    Tail = (Head = BUFF) + fread(BUFF, 1, 1024 * 1024, stdin);
    if (Head == Tail) return EOF;
  }
  return *Head++;
}
inline bool isDigit(const char& x) {
  if (x >= '0' && x <= '9') return true;
  return false;
}
inline void ReadInt(int& x) {
  char buf = 0;
  while (!isDigit(buf = GetChar()))
    ;
  x = buf - '0';
  while (isDigit(buf = GetChar())) x = x * 10 + buf - '0';
}
int n;
int a[200005];
int s, f;
long long pre[200005];
int realtime(int pos) {
  int delta = pos - 1;
  return ((s - delta + n) % n + n) % n;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  pre[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    pre[i] = pre[i - 1] + a[i];
  }
  for (int i = 1; i <= n; i++) {
    a[i + n] = a[i];
    pre[i + n] = pre[n + i - 1] + a[i];
  }
  cin >> s >> f;
  s--;
  f--;
  int len = f - s;
  long long best = pre[len];
  int time = 1;
  for (int i = 1; i <= n * 2 - len; i++) {
    long long part = pre[i + len] - pre[i];
    if (part > best ||
        (part == best && (time > realtime(i) && realtime(i) != 0))) {
      best = part;
      time = realtime(i);
    }
  }
  printf("%d\n", time ? time : n);
}
