#include <bits/stdc++.h>
using namespace std;
int n;
int a[102];
int x, y;
int ac[102];
int main() {
  scanf("%d", &n);
  int sum = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    sum += a[i];
    ac[i] = ac[i - 1] + a[i];
  }
  scanf("%d %d", &x, &y);
  int cant = 0;
  int xx, yy = 0;
  for (int i = 1; i <= n; i++) {
    xx = ac[i];
    yy = sum - ac[i];
    if (xx >= x && xx <= y && yy >= x && yy <= y) {
      printf("%d\n", i + 1);
      return 0;
    }
  }
  printf("0\n");
  return 0;
}
