#include <bits/stdc++.h>
#pragma GCC target("sse4.2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long MAXN = 2 * 100 + 7, MOD = 1000 * 1000 * 1000 + 7;
long long c[MAXN];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ;
  long long n, sum = 0, ps = 0, x, y;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> c[i];
    sum += c[i];
  }
  cin >> x >> y;
  for (long long i = 0; i < n; i++) {
    if (ps >= x && ps <= y) {
      if (sum - ps <= y && sum - ps >= x) return cout << i + 1 << endl, 0;
    }
    ps += c[i];
  }
  return cout << 0 << endl, 0;
}
