#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <typename T>
inline T ABS(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
inline T MAX(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
inline T CHKMIN(T &a, T b) {
  if (a > b) a = b;
  return a;
}
template <typename T>
inline T CHKMAX(T &a, T b) {
  if (a < b) a = b;
  return a;
}
template <typename T>
inline void SWAP(T &a, T &b) {
  static T c;
  c = a;
  a = b;
  b = c;
}
int m, c[110], sum[110], x, y;
int main() {
  cin >> m;
  for (int i = 1; i <= m; i++) {
    cin >> c[i];
    sum[i] = sum[i - 1] + c[i];
  }
  cin >> x >> y;
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    int temp = sum[m] - sum[i - 1];
    if (temp >= x && temp <= y && sum[i - 1] >= x && sum[i - 1] <= y) {
      ans = i;
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
