#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 55;
long long a[maxn];
long long b[maxn];
long long c[maxn];
int main() {
  int n;
  long long x;
  scanf("%d", &n);
  for (int i = n; i > n / 2; --i) {
    scanf("%lld", &a[i]);
    b[i] = a[i];
  }
  scanf("%lld", &x);
  for (int i = 1; i <= n / 2; ++i) {
    a[i] = x;
    b[i] = x;
  }
  for (int i = 1; i <= n; ++i) {
    c[i] = a[i];
    b[i] += b[i - 1];
  }
  if (x >= 0) {
    if (b[n] > 0) {
      printf("%d\n", n);
    } else {
      printf("-1\n");
    }
    return 0;
  }
  int k = n / 2 + 1;
  for (int i = n / 2 + 1; i <= n; ++i) {
    if (b[i] - x * (i - k) > 0)
      ;
    else {
      k = i + 1;
    }
  }
  if (k == n + 1)
    printf("-1\n");
  else
    printf("%d\n", k);
  return 0;
}
