#include <bits/stdc++.h>
using namespace std;
int n, a[200001], x, y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  cin >> x >> y;
  for (int i = 1; i <= n; ++i) {
    int cnt1 = 0, cnt2 = 0;
    for (int j = 1; j <= n; ++j)
      if (j >= i)
        cnt2 += a[j];
      else
        cnt1 += a[j];
    if (cnt1 >= x && cnt1 <= y && cnt2 >= x && cnt2 <= y) {
      cout << i;
      return 0;
    }
  }
  cout << 0;
}
