#include <bits/stdc++.h>
using namespace std;
const int MAXN = 311111;
const int MAXM = 3111;
int a[MAXN], s[MAXN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s[i] = a[i] + (i > 0 ? s[i - 1] : 0);
  }
  int x, y;
  cin >> x >> y;
  for (int i = 0; i < n; i++) {
    int X = s[i] - a[i];
    int Y = s[n - 1] - X;
    if (x <= X && X <= y && x <= Y && Y <= y) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << 0 << endl;
  return 0;
}
