#include <bits/stdc++.h>
int main() {
  int m = 0, i = 0, c[100], x, y, s1 = 0, s2 = 0, ans = 0;
  scanf("%d", &m);
  for (i = 0; i < m; i++) {
    scanf("%d", &c[i]);
    s1 += c[i];
  }
  scanf("%d%d", &x, &y);
  for (i = 0; i < m; i++) {
    s1 -= c[i];
    s2 += c[i];
    if ((s1 >= x) && (s1 <= y) && (s2 >= x) && (s2 <= y)) {
      ans = i + 2;
      break;
    }
  }
  printf("%d", ans);
  return 0;
}
