#include <bits/stdc++.h>
using namespace std;
int a[101];
int main() {
  int n, i, low, hi;
  scanf("%d", &n);
  int sm = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sm += a[i];
  }
  scanf("%d%d", &low, &hi);
  int sm1 = 0;
  int ans = 0;
  for (i = 0; i < n; i++) {
    sm1 += a[i];
    if (sm1 >= low && sm - sm1 >= low && sm1 <= hi && sm - sm1 <= hi) {
      ans = i + 2;
      break;
    }
  }
  printf("%d\n", ans);
  return 0;
}
