#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, t;
  while (scanf("%d", &n) == 1) {
    int v[110];
    int sum = 0;
    for (int i = int(0); i < int(n); i++) {
      scanf("%d", &v[i]);
      sum += v[i];
    }
    scanf("%d %d", &x, &y);
    bool sw = false;
    int res = 0, temp = 0;
    for (int i = int(0); i < int(n); i++) {
      temp += (v[i]);
      if (x <= temp && temp <= y && x <= (sum - temp) && (sum - temp) <= y) {
        res = i + 2;
        sw = true;
        break;
      }
    }
    printf("%d\n", res);
  }
  return 0;
}
