#include <bits/stdc++.h>
using namespace std;
int64_t n;
int64_t x;
int64_t it[500001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int64_t i = 0; i < (n + 1) / 2; i++) {
    cin >> it[i];
  }
  cin >> x;
  for (int64_t i = (n + 1) / 2; i < n; i++) {
    it[i] = x;
  }
  int64_t pre[(n + 1) / 2];
  pre[0] = 0;
  for (int64_t i = 0; i < (n + 1) / 2; i++) {
    pre[0] += it[i];
  }
  for (int64_t j = 1; j < (n / 2) + 1; j++) {
    pre[j] = pre[j - 1];
    pre[j] += x;
    pre[j] -= it[j - 1];
  }
  for (int64_t i = 1; i < (n / 2) + 1; i++) {
    pre[i] = min(pre[i], pre[i - 1]);
  }
  int64_t co = 0;
  int64_t ans = -1;
  for (int64_t j = n / 2; j >= 0; j--) {
    if (pre[j] + co * x > 0) {
      ans = -(j + 1 - n - 1);
      break;
    }
    co += 1;
  }
  cout << ans << endl;
  return 0;
}
