#include <bits/stdc++.h>
using namespace std;
long n;
long a[105];
void solve() {
  long i, tm, tong, da, x, y;
  tong = 0;
  bool si = false;
  for (i = 1; i <= n; i++) {
    scanf("%ld", &a[i]);
    tong += a[i];
  }
  scanf("%ld %ld", &x, &y);
  tm = 0;
  for (i = 1; i <= n; i++) {
    tm += a[i];
    if (tm >= x && tm <= y && tong - tm >= x && tong - tm <= y) {
      si = true;
      da = i + 1;
      break;
    }
  }
  if (si == false) {
    printf("0\n");
    return;
  }
  printf("%ld\n", da);
}
int main() {
  while (scanf("%ld", &n) > 0) {
    solve();
  }
  return 0;
}
