#include <bits/stdc++.h>
using namespace std;
int anss[10005];
int main() {
  int n, i, x, y;
  while (scanf("%d", &n) != EOF) {
    for (i = 1; i <= n; i++) scanf("%d", &anss[i]);
    scanf("%d%d", &x, &y);
    bool flag = false;
    for (int j = 1; j <= n; j++) {
      int s1 = 0, s2 = 0;
      for (i = 1; i <= n; i++)
        if (i < j)
          s1 += anss[i];
        else
          s2 += anss[i];
      if (s1 >= x && s1 <= y && s2 <= y && s2 >= x) {
        flag = true;
        printf("%d\n", j);
        break;
      }
    }
    if (!flag) printf("0\n");
  }
  return 0;
}
