#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[109] = {0}, m, x, y, ret = 0, high = 0, inter = 0, big = 0;
  scanf("%d", &m);
  for (int i = 0; i < m; i++) scanf("%d", &arr[i]);
  scanf("%d%d", &x, &y);
  for (int i = 0; i <= m; i++) {
    big = 0, inter = 0;
    for (int j = 0; j < m; j++) {
      (j < i) ? big += arr[j] : inter += arr[j];
    }
    if (inter >= x && inter <= y && big >= x && big <= y) {
      printf("%d\n", i + 1);
      return 0;
    }
  }
  printf("%d\n", 0);
  return 0;
}
