#include <bits/stdc++.h>
using namespace std;
int s[111];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int i, x, y, sum = 0;
    for (i = 1; i <= n; i++) scanf("%d", &s[i]), sum += s[i];
    scanf("%d %d", &x, &y);
    if (sum < 2 * x || sum > 2 * y) {
      printf("0\n");
      continue;
    }
    int t = 0;
    for (i = 1; i <= n; i++) {
      t += s[i];
      if (t >= x && sum - t <= y) break;
    }
    if (t >= x && t <= y && sum - t >= x && sum - t <= y)
      printf("%d\n", i + 1);
    else
      printf("0\n");
  }
  return 0;
}
