#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, x, y, sum = 0;
  int arr[100];
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  cin >> x >> y;
  int left = 0, right;
  for (int i = 0; i < m; i++) {
    left += arr[i];
    right = sum - left;
    if (left <= y && left >= x && right <= y && right >= x) {
      cout << i + 2;
      return 0;
    }
  }
  cout << 0;
  return 0;
}
