#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[12345];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int up, down;
  cin >> down >> up;
  for (int i = 1; i <= n; i++) {
    int l, r;
    l = r = 0;
    for (int j = 1; j < i; j++) {
      l += a[j];
    }
    for (int j = i; j <= n; j++) {
      r += a[j];
    }
    if (l >= down and l <= up and r >= down and r <= up) {
      cout << i;
      return 0;
    }
  }
  cout << '0';
}
