#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, k[101], x, y, cum1[101], cum2[101];
  cin >> m;
  cin >> k[0];
  cum1[0] = k[0];
  for (int i = 1; i < m; ++i) {
    cin >> k[i];
    cum1[i] = k[i] + cum1[i - 1];
  }
  cum2[m - 1] = k[m - 1];
  for (int i = m - 2; i >= 0; --i) cum2[i] = k[i] + cum2[i + 1];
  cin >> x >> y;
  for (int i = 0; i < m - 1; ++i)
    if (cum1[i] >= x && cum1[i] <= y && cum2[i + 1] >= x && cum2[i + 1] <= y) {
      cout << i + 2 << endl;
      return 0;
    }
  cout << 0 << endl;
  return 0;
}
