#include <bits/stdc++.h>
using namespace std;
int main() {
  int val[110], n, sum, x, y;
  while (~scanf("%d", &n)) {
    sum = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &val[i]);
      sum += val[i];
    }
    scanf("%d%d", &x, &y);
    int tempsum = 0, flag = 0;
    for (int i = 1; i <= n; i++) {
      tempsum += val[i];
      if (tempsum >= x && tempsum <= y && sum - tempsum >= x &&
          sum - tempsum <= y) {
        flag = i;
        break;
      }
    }
    if (flag)
      printf("%d\n", flag + 1);
    else
      puts("0");
  }
  return 0;
}
