#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp, total, q, i, x, y, myt;
  int arr[500];
  cin >> n;
  for (i = 0; i < 200; i++) {
    arr[i] = 0;
  }
  myt = 0;
  for (q = 0; q < n; q++) {
    cin >> temp;
    arr[q] = temp;
    myt = myt + temp;
  }
  cin >> x >> y;
  total = 0;
  for (i = 0; i < n; i++) {
    if (total >= x && total <= y) {
      temp = myt - total;
      if (temp >= x && temp <= y) {
        cout << (i + 1);
        return 0;
      }
    }
    total = total + arr[i];
  }
  cout << 0;
  return 0;
}
