#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, x, y, ans;
  int students_in_first_group = 0;
  int students_in_second_group = 0;
  cin >> m;
  vector<int> c(m);
  for (int i = 0; i < m; i++) {
    cin >> c[i];
    students_in_second_group += c[i];
  }
  cin >> x >> y;
  int l = 0;
  while (students_in_first_group < students_in_second_group) {
    students_in_first_group += c[l];
    students_in_second_group -= c[l];
    if ((students_in_second_group >= x && students_in_second_group <= y) &&
        (students_in_first_group >= x && students_in_first_group <= y)) {
      cout << l + 2;
      return 0;
    }
    l++;
  }
  cout << 0;
  return 0;
}
