#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, c[100], x, y, g1 = 0, g2 = 0, i = 0;
  for (cin >> m; i < m; cin >> c[i], g2 += c[i++])
    ;
  for (cin >> x >> y, i = 0; i < m; g1 += c[i], g2 -= c[i++])
    if (g1 >= x && g1 <= y && g2 >= x && g2 <= y) {
      cout << i + 1;
      return 0;
    }
  cout << 0;
}
