#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18, MAXN = 111, MOD = 1e9 + 7;
long long n, m, a[MAXN], k, g, x, y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    k += a[i];
  }
  cin >> x >> y;
  for (int i = 0; i < n; i++) {
    if (g + a[i] <= y && g + a[i] >= x && k - a[i] >= x && k - a[i] <= y) {
      cout << i + 2;
      return 0;
    }
    g += a[i];
    k -= a[i];
  }
  cout << 0;
}
