#include <bits/stdc++.h>
using namespace std;
int main() {
  int s1, s2, n, x, y, i = 0, k = 0;
  scanf("%d", &n);
  vector<int> a(n, 0);
  while (i < n) {
    scanf("%d", &(a[i]));
    i++;
  }
  scanf("%d %d", &x, &y);
  while (k < n) {
    i = 0;
    s1 = 0;
    s2 = 0;
    while (i < k) {
      s1 += a[i];
      i++;
    }
    while (i < n) {
      s2 += a[i];
      i++;
    }
    if ((s2 >= x) && (s2 <= y) && (s1 >= x) && (s1 <= y)) {
      printf("%d", k + 1);
      return 0;
    }
    k++;
  }
  printf("0");
  return 0;
}
