#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable : 4786)
int main() {
  int n, a[110], i, res, sum, x, y, tot;
  while (cin >> n) {
    tot = 0;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      tot += a[i];
    }
    cin >> x >> y;
    sum = 0;
    res = 0;
    for (i = 1; i <= n; i++) {
      if (sum >= x && sum <= y && tot >= x && tot <= y) {
        res = i;
        break;
      }
      sum += a[i];
      tot -= a[i];
    }
    cout << res << endl;
  }
  return 0;
}
