#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0;
  cin >> n;
  int a[n];
  vector<int> s(100, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum = sum + a[i];
  }
  int x, y;
  cin >> x;
  cin >> y;
  int flag = 0, k = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      s[i] = s[i] + a[j];
    }
    if (s[i] >= x && s[i] <= y && (sum - s[i]) >= x && (sum - s[i]) <= y) {
      flag = 1;
      k = i;
      break;
    }
  }
  if (flag == 1)
    cout << k + 2;
  else
    cout << "0";
  return 0;
}
