#include <bits/stdc++.h>
static int p[100000 + 1];
int main(void) {
  int n, i, s, f, delta, ncrt, nmax = 0, dmax, h, r;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
  }
  scanf("%d %d", &s, &f);
  ncrt = 0;
  for (i = 1; i <= f - s; i++) {
    ncrt += p[i];
  }
  nmax = ncrt;
  dmax = 1;
  for (i = (f - s) + 1; i <= n; i++) {
    ncrt = ncrt - p[i - (f - s)] + p[i];
    delta = s - (i - (f - s) + 1);
    if (delta <= 0) {
      delta += n;
    }
    delta++;
    if (ncrt > nmax) {
      nmax = ncrt;
      dmax = delta;
    } else if (ncrt == nmax && delta < dmax) {
      dmax = delta;
    }
  }
  for (i = 1; i < f - s; i++) {
    ncrt = ncrt - p[n - (f - s) + i] + p[i];
    delta = s - (n - (f - s) + i + 1);
    if (delta <= 0) {
      delta += n;
    }
    delta++;
    if (ncrt > nmax) {
      nmax = ncrt;
      dmax = delta;
    } else if (ncrt == nmax && delta < dmax) {
      dmax = delta;
    }
  }
  printf("%d\n", dmax);
  return 0;
}
