#include <bits/stdc++.h>
int main() {
  int c[101];
  int m, i, mid, x, y;
  scanf("%d", &m);
  scanf("%d", &c[1]);
  for (i = 2; i <= m; i++) {
    scanf("%d", &mid);
    c[i] = c[i - 1] + mid;
  }
  scanf("%d%d", &x, &y);
  for (i = 1; i <= m; i++)
    if (c[i] <= y && c[i] >= x && c[m] - c[i] <= y && c[m] - c[i] >= x) break;
  if (i > m)
    putchar('0');
  else
    printf("%d", i + 1);
  return 0;
}
