#include <bits/stdc++.h>
using namespace std;
int m;
long long c[200], d[200], sum = 0, x, y;
int main() {
  cin >> m;
  d[0] = 0;
  for (int i = 1; i <= m; i++) {
    cin >> c[i];
    d[i] = d[i - 1] + c[i];
  }
  sum = d[m];
  cin >> x >> y;
  for (int i = 1; i <= m; i++) {
    if (d[i] >= x && d[i] <= y && sum - d[i] >= x && sum - d[i] <= y) {
      cout << i + 1;
      return 0;
    }
  }
  cout << 0;
}
