#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, ar[109], sum[109], x, y;
  while (cin >> N) {
    int flag = 0;
    for (int i = 0, _n = N; i < _n; i++) {
      cin >> ar[i + 1];
    }
    cin >> x >> y;
    for (int i = 1, _n = N + 1; i < _n; i++) {
      int a = 0, b = 0;
      for (int j = 1, _n = i; j < _n; j++) {
        a += ar[j];
      }
      for (int j = i, _n = N + 1; j < _n; j++) {
        b += ar[j];
      }
      if (a >= x && a <= y && b >= x && b <= y) {
        cout << i << endl;
        flag = 1;
        break;
      }
    }
    if (!flag) puts("0");
  }
  return 0;
}
