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