#include <bits/stdc++.h>
int v[100];
int main() {
  int m;
  scanf("%d", &m);
  int l = 0, r = 0;
  for (int i = 0; i < m; ++i) {
    scanf("%d", v + i);
    r += v[i];
  }
  int x, y;
  scanf("%d%d", &x, &y);
  int pass = 0;
  for (int i = 0; i < m; ++i) {
    if (x <= l && l <= y && x <= r && r <= y) {
      pass = i + 1;
      break;
    }
    l += v[i];
    r -= v[i];
  }
  printf("%d\n", pass);
  return 0;
}
