#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, x, y, sx, sy, i, j, ans;
  vector<int> v;
  cin >> m;
  ans = sy = 0;
  for (i = 0; i < m; i++) {
    cin >> x;
    sy += x;
    v.push_back(x);
  }
  cin >> x >> y;
  sx = 0;
  for (i = 0; i < m; i++) {
    sx += v[i];
    sy -= v[i];
    if (sx >= x and sy <= y and sx <= y and sy >= x) {
      ans = i + 2;
      break;
    }
  }
  cout << ans << endl;
  v.clear();
  return 0;
}
