#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int x, y;
  cin >> x >> y;
  for (int ball = 1; ball <= 100; ball++) {
    int gr1 = 0, gr2 = 0;
    for (int i = 0; i < n; i++) {
      if (i + 1 < ball) {
        gr1 += A[i];
      } else {
        gr2 += A[i];
      }
    }
    if (gr1 <= y && gr1 >= x && gr2 <= y && gr2 >= x) {
      cout << ball;
      return 0;
    }
  }
  cout << 0;
  return 0;
}
