#include <bits/stdc++.h>
using namespace std;
int N, P[105], x, y, total;
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &P[i]);
    total += P[i];
  }
  scanf("%d%d", &x, &y);
  int sol = 0;
  int k = 1;
  int aux = 0;
  for (int j = 0; j < N; j++) {
    aux += P[j];
    k++;
    if (aux >= x && aux <= y && (total - aux) >= x && (total - aux) <= y) {
      sol = k;
      break;
    }
  }
  printf("%d\n", sol);
  return 0;
}
