#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 6;
const long long INF = 1e18;
int n;
long long k;
long long a[M], sum[M];
long long solve(int x) { return sum[k] - sum[x - 1]; }
int main() {
  scanf("%d", &n);
  k = (n + 1) / 2;
  for (int i = 1; i <= k; i++) {
    scanf("%lld", &a[i]);
    sum[i] = sum[i - 1] + a[i];
  }
  int x;
  scanf("%d", &x);
  long long minn = INF;
  long long ans = -1;
  long long half = 1ll * n / 2;
  for (int i = 1; i <= k; i++) {
    long long tmp = solve(i) + half * x;
    if (minn == INF)
      minn = tmp;
    else
      minn -= x, minn = min(minn, tmp);
    if (minn > 0) ans = n - i + 1;
  }
  printf("%lld\n", ans);
  return 0;
}
