#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[101];
  for (int i = 1; i <= n; i++) cin >> a[i];
  int MIN, MAX;
  cin >> MIN >> MAX;
  for (int mark = 1; mark <= n; mark++) {
    int upper = 0, lower = 0;
    for (int i = 1; i <= n; i++) {
      if (i < mark) lower += a[i];
      if (i >= mark) upper += a[i];
    }
    if (lower >= MIN && lower <= MAX && upper <= MAX && upper >= MIN) {
      cout << mark;
      return 0;
    }
  }
  cout << 0;
}
