#include <bits/stdc++.h>
using namespace std;
int child[150];
int sum, group;
int x, y;
int n, ss;
int findk() {
  group = child[1];
  for (int i = 2; i <= n; i++) {
    if (group >= x) {
      if (group > y) return 0;
      ss = sum - group;
      if (ss <= y && ss >= x) return i;
    }
    group += child[i];
  }
  return 0;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    sum = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &child[i]);
      sum += child[i];
    }
    scanf("%d%d", &x, &y);
    printf("%d\n", findk());
  }
  return 0;
}
