#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int a[N], n;
int x, y, sum;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  cin >> x >> y;
  int pos = 0, bef = 0;
  for (int i = 1; i < n; i++) {
    bef += a[i];
    sum -= a[i];
    if (bef >= x && bef <= y && sum >= x && sum <= y) {
      pos = i + 1;
      break;
    }
  }
  cout << pos << '\n';
  return 0;
}
