#include <bits/stdc++.h>
using namespace std;
int n, ar[110], x, y, sum[110];
inline void input() {
  cin >> n;
  ;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i];
    sum[i] = sum[i - 1] + ar[i];
  }
  cin >> x >> y;
}
int main() {
  input();
  for (int i = 1; i <= n - 1; i++)
    if ((sum[i] >= x && sum[i] <= y) &&
        ((sum[n] - sum[i]) >= x && (sum[n] - sum[i]) <= y)) {
      cout << i + 1;
      return 0;
    }
  cout << 0;
}
