#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c[111], i, x, y, s = 0, ss = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> c[i];
    s += c[i];
  }
  cin >> x >> y;
  for (i = 0; i < n; i++) {
    ss += c[i];
    if (ss >= x && ss <= y && s - ss >= x && s - ss <= y) {
      n = 0;
      cout << i + 2 << endl;
      break;
    }
  }
  if (n) cout << 0 << endl;
  return 0;
}
