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