#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, a[110], z = 0, sum = 0, ans = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  cin >> x >> y;
  bool check = false;
  for (int i = 0; i < n; i++) {
    z += a[i];
    if (z >= x && z <= y && (sum - z) <= y && (sum - z) >= x) {
      check = true;
      ans = i + 2;
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
