#include <bits/stdc++.h>
int main(void) {
  unsigned m;
  scanf("%u", &m);
  unsigned a[101];
  unsigned total = 0;
  for (unsigned i = 0; i < m; i++) {
    scanf("%u", &a[i]);
    total += a[i];
  }
  unsigned x, y;
  scanf("%u %u", &x, &y);
  unsigned k = 0;
  if (total >= 2 * x && total <= 2 * y) {
    char fl = 1;
    unsigned check_sum = 0;
    for (unsigned i = 0; i <= m && fl; i++) {
      check_sum += a[i];
      if (check_sum >= x && check_sum <= y && (total - check_sum) >= x &&
          (total - check_sum) <= y) {
        k = i + 2;
        fl = 0;
      } else if (check_sum > y)
        fl = 0;
    }
  }
  printf("%u", k);
}
