#include <bits/stdc++.h>
int aa[110];
int main() {
  int n, a, x, y, r, s;
  scanf("%d", &n);
  for (a = 1; a <= n; a++) {
    scanf("%d", &aa[a]);
    aa[a] += aa[a - 1];
  }
  scanf("%d%d", &x, &y);
  for (a = 1; a <= n; a++) {
    r = aa[a];
    s = aa[n] - aa[a];
    if (r >= x && s <= y && r <= y && s >= x) {
      printf("%d\n", ++a);
      return 0;
    }
  }
  printf("0\n");
  return 0;
}
