#include <bits/stdc++.h>
using namespace std;
int n, m, p, cnt, ans, ls[100010], rs[100010];
long long fo[100010], la[100010], su, x[100010], y[100010];
int workl(long long mi) {
  int i, s, a, b, j = 0;
  long long k = 0;
  for (i = 1; i <= n; i++) {
    if (x[i] + k <= mi)
      y[i] = x[i];
    else
      y[i] = mi - k;
    k += y[i];
  }
  for (i = n; i; i--) la[i] = la[i + 1] + y[i];
  for (i = s = 1; i <= (n + 1) / 2; i++) {
    s = max(s, i);
    if (y[i] >= p) {
      y[i] -= p, y[i + 1] += y[i];
      la[i + 1] += y[i];
      s = i + 1;
      continue;
    }
    if (s > rs[i] || la[s] - la[rs[i] + 1] < p) {
      la[i + 1] += y[i];
      y[i + 1] += y[i];
      j++;
      continue;
    }
    k = p;
    while (k && s <= n) {
      if (y[s] < k) {
        k -= y[s];
        la[s] = 0;
        y[s++] = 0;
        continue;
      }
      y[s] -= k;
      la[s] -= k;
      k = 0;
    }
  }
  return j;
}
int workr(long long mi) {
  int i, s, a, b, j = 0;
  long long k = 0;
  for (i = n; i; i--) {
    if (x[i] + k <= mi)
      y[i] = x[i];
    else
      y[i] = mi - k;
    k += y[i];
  }
  for (i = 1; i <= n; i++) fo[i] = fo[i - 1] + y[i];
  for (i = s = n; i > (n + 1) / 2; i--) {
    s = min(s, i);
    if (y[i] >= p) {
      y[i] -= p, y[i - 1] += y[i];
      fo[i - 1] += y[i];
      s = i - 1;
      continue;
    }
    if (s < ls[i] || fo[s] - fo[ls[i] - 1] < p) {
      y[i - 1] += y[i];
      fo[i - 1] += y[i];
      j++;
      continue;
    }
    k = p;
    while (k && s) {
      if (y[s] < k) {
        k -= y[s];
        fo[s] = 0;
        y[s--] = 0;
        continue;
      }
      y[s] -= k;
      fo[s] -= k;
      k = 0;
    }
  }
  return j;
}
int main() {
  int i, s, a, b, j, k;
  long long l1, r1, m1;
  scanf("%d%d%d", &n, &m, &p);
  for (i = 1; i <= n; i++) scanf("%I64d", &x[i]);
  for (i = 1; i <= n; i++)
    ls[i] = max((long long)1, i - (long long)min(i, n - i + 1) * m),
    rs[i] = min((long long)n, i + (long long)min(i, n - i + 1) * m);
  l1 = 1;
  r1 = su = (long long)n * p;
  while (l1 < r1) {
    m1 = (l1 + r1) / 2;
    a = workl(m1);
    b = workr(su - m1);
    if (b - a >= 0)
      r1 = m1;
    else
      l1 = m1 + 1;
  }
  ans = min(max(workl(l1), workr(su - l1)),
            max(workl(l1 - 1), workr(su - l1 + 1)));
  printf("%d", ans);
  return 0;
}
