#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[105], i, x, y, s = 0, t = 0;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i], t += a[i];
  cin >> x >> y;
  for (i = 1; i <= n; i++) {
    s += a[i];
    t -= a[i];
    if (s >= x && s <= y && t >= x && t <= y) {
      cout << i + 1;
      return 0;
    }
  }
  cout << 0;
  return 0;
}
