#include <bits/stdc++.h>
using namespace std;
bool inrange(int c, int x, int y) { return !((c > y) || (c < x)); }
int main() {
  int m, t, s[110], x, y;
  while (cin >> m) {
    s[0] = 0;
    for (int i = 0; i < m; i++) cin >> t, s[i + 1] = s[i] + t;
    cin >> x >> y;
    int i;
    for (i = 2; i <= m; i++)
      if (inrange(s[i - 1], x, y) && inrange(s[m] - s[i - 1], x, y)) break;
    cout << (i == (m + 1) ? 0 : i) << endl;
  }
}
