#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, m, n, x, y, total;
  while (scanf("%d", &n) != EOF) {
    vector<int> v;
    total = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", &k);
      total = total + k;
      v.push_back(k);
    }
    scanf("%d %d", &x, &y);
    bool possible = false;
    for (i = 1; i <= n; i++) {
      k = 0;
      m = total;
      for (j = 1; j < i; j++) {
        k = k + v[j - 1];
        m = m - v[j - 1];
      }
      if (m >= x && m <= y && k >= x && k <= y) {
        possible = true;
        break;
      }
    }
    if (possible)
      cout << i << endl;
    else
      cout << 0 << endl;
  }
  return 0;
}
