#include <bits/stdc++.h>
using namespace std;
int arr[101];
int main() {
  cin.tie(0);
  memset(arr, 0, sizeof(arr));
  int m;
  cin >> m;
  for (int i = 1; i <= m; i++) {
    int ci;
    cin >> ci;
    arr[i] = ci;
  }
  int x, y;
  cin >> x >> y;
  int ans = 0;
  for (int k = 1; k <= 100; k++) {
    int f = 0, s = 0;
    for (int i = 1; i < k; i++) f += arr[i];
    for (int i = k; i <= 100; i++) s += arr[i];
    if (x <= f && f <= y && x <= s && s <= y) {
      ans = k;
      break;
    }
  }
  cout << ans << "\n";
  return 0;
}
