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