#include <bits/stdc++.h>
using namespace std;
int c[100005] = {0}, d[5];
int main() {
  ifstream inf("input.txt");
  int n, a[200], j = 0, j1 = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    j1 += a[i];
  }
  int x, y;
  cin >> x >> y;
  for (int i = 1; i <= n - 1; i++) {
    j += a[i];
    if (j >= x && j <= y && j1 - j >= x && j1 - j <= y) {
      cout << i + 1;
      return 0;
    }
  }
  cout << 0;
}
