#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("sse4.2")
long long gcd(long long n, long long m) {
  if (n == 0) return m;
  return gcd(m % n, n);
}
bool ifprime(long long n) {
  if (n == 1) return false;
  long long i;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void disp(vector<long long> v) {
  for (auto u : v) cout << u << " ";
  cout << "\n";
}
void remleadzero(vector<int>& v) {
  vector<int> u;
  int i = 0;
  while (v[i] == 0) i++;
  while (i < v.size()) {
    u.push_back(v[i]);
    i++;
  }
  v = u;
}
long long fast_expo(long long n, long long m, long long md) {
  long long a = 1;
  while (m > 0) {
    if (m & 1) a = (a * n) % md;
    n = (n * n) % md;
    m /= 2;
  }
  return a % md;
}
inline long long sqroot(long long n) {
  long double N = n;
  N = sqrtl(N);
  long long sq = N - 2;
  sq = max(sq, 0LL);
  while (sq * sq < n) {
    sq++;
  }
  if ((sq * sq) == n) return sq;
  return -1;
}
inline long long sqroot1(long long n) {
  long double N = n;
  N = sqrtl(N);
  long long sq = N - 2;
  sq = max(sq, 0LL);
  while (sq * sq < n) {
    sq++;
  }
  if ((sq * sq) == n) return sq;
  return sq - 1;
}
inline long long cbroot(long long n) {
  long double N = n;
  N = cbrtl(N);
  long long cb = N - 2;
  cb = max(cb, 0LL);
  while (cb * cb * cb < n) {
    cb++;
  }
  if ((cb * cb * cb) == n) return cb;
  return -1;
}
inline long long cbroot1(long long n) {
  long double N = n;
  N = cbrtl(N);
  long long cb = N - 2;
  cb = max(cb, 0LL);
  while (cb * cb * cb < n) {
    cb++;
  }
  if ((cb * cb * cb) == n) return cb;
  return cb - 1;
}
int dig_sum(long long n) {
  int ret = 0;
  while (n > 0) {
    ret += (n % 10);
    n /= 10;
  }
  return ret;
}
int sq(int x) { return x * x; }
int gcd(int n, int m) {
  if (n == 0) return m;
  return gcd(m % n, n);
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long rand_num(long long n) {
  long long random_number = uniform_int_distribution<long long>(0, n - 1)(rng);
  return random_number;
}
chrono::high_resolution_clock::time_point start;
chrono::high_resolution_clock::time_point cur_time;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void solve_case() {
  int n;
  cin >> n;
  long long a[(n + 1) / 2 + 1], x, sum = 0, mx = -2e15;
  for (int i = 1; i <= (n + 1) / 2; i++) cin >> a[i];
  cin >> x;
  for (int i = 1; i <= (n + 1) / 2; i++) {
    sum += a[i];
    a[i] = (sum - i * x);
  }
  sum += ((n - (n + 1) / 2) * x);
  int k = n, ind = 1;
  for (int i = n / 2 + 1; i <= n; i++) {
    if (sum > 0 and (sum - mx) > 0) {
      cout << k << ' ';
      return;
    }
    sum -= x;
    mx = max(mx, a[ind++]);
    k--;
  }
  cout << -1;
}
void precompute() {}
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  ;
  chrono::high_resolution_clock::time_point start =
      chrono::high_resolution_clock::now();
  precompute();
  int T = 1;
  cout << fixed << setprecision(10);
  for (int t = 1; t <= T; t++) {
    solve_case();
  }
  chrono::high_resolution_clock::time_point end =
      chrono::high_resolution_clock::now();
  long double time_spent =
      (chrono::duration_cast<chrono::duration<long double>>(end - start))
          .count();
  return 0;
}
