#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T& RD(T& x) {
  char c;
  for (c = getchar(); c < '0'; c = getchar())
    ;
  x = c - '0';
  for (c = getchar(); '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x;
}
const int inf = 0x3f3f3f3f;
const int maxn = 105;
int a[maxn];
int s[maxn];
int main() {
  int n;
  scanf("%d", &n);
  s[0] = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    s[i] = s[i - 1] + a[i];
  }
  int x, y;
  scanf("%d%d", &x, &y);
  for (int i = 1; i <= n; i++) {
    if (s[i] >= x && s[i] <= y && (s[n] - s[i]) >= x && (s[n] - s[i]) <= y) {
      ans = i;
      break;
    }
  }
  if (ans != 0) ans++;
  printf("%d\n", ans);
  return 0;
}
