#include <bits/stdc++.h>
using namespace std;

using ll = long long;

#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
#define len(x) int((x).size())

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define randint(n) uniform_int_distribution<int>(1, (n))(rng)

int ceiling(int a, int b)
{
	if(a%b == 0) return int(a/b);
	return int(a/b) + 1;
}

int d;
int b;

const int p2 = (1<<17);
int st[p2+p2];

int query(int l, int r)
{
	l = max(l,1);
	r = min(r,p2);

	l += p2-1;
	r += p2-1;

	int ret = 0;

	while(l<=r)
	{
		if(l%2==1) ret += st[l++];
		if(r%2==0) ret += st[r--];
		l/=2;
		r/=2;
	}

	return ret;
}

void upd(int ind, int new_val)
{
	ind += p2-1;
	st[ind]=new_val;
	ind/=2;

	while(ind>0)
	{
		st[ind] = st[ind+ind] + st[ind+ind+1];
		ind /= 2;
	}
}

int solve(vector<int> A, int c)
{
	// solve the subproblem with an array of length n (A) where students can move a distance d and where the first c things are checked

	// initialise seg tree

	for(int i=0; i<p2; i++)
	{
		if(i < len(A))
		{
			//cout << A[i] << " ";
			st[i+p2]=A[i];
		}
		else st[i+p2]=0;
	}
	//cout << endl;

	for(int i=p2-1; i>=1; i--) st[i] = st[i+i] + st[i+i+1];

	// done

	int a_ind=0;
	int ans=0;

	for(int i=1; i<=c; i++)
	{
		// try and satisfy ith room requirement

		// if(i==5)
		// {
		// 	for(int j=1; j<=100; j++)
		// 	{
		// 		cout << j << " " << query(j,j) << endl;
		// 	}
		// }

		int l,r;

		if(ll(i)*ll(d) >= ll(p2))
		{
			l=1;
			r=p2;
		}

		else
		{
			l=i-d*i;
			r=i+d*i;
		}

		if(query(l,r) < b) // we fail to be able to satisfy here
		{
			//cout << i << endl;

			ans++;
			continue;
		}

		int place=b; // 'children left to place'

		while(place>0)
		{
			if(A[a_ind] >= place)
			{
				upd(a_ind+1,A[a_ind]-place); // i THINK that's a +
				A[a_ind] -= place;

				// cout << i << " " << "UPDATE: " << a_ind+1 << " " << A[a_ind]-place << endl;

				break;
			}

			place -= A[a_ind];
			upd(a_ind+1,0);

			// cout << "UPD2 " << a_ind+1 << " 0" << endl;

			a_ind++;
		}
	}

	//if(ans==44066) ans=
	return ans;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	#ifdef ARTHUR_LOCAL
		ifstream cin("input.txt");
	#endif

	int n;
	cin>>n>>d>>b;

	vector<int> A;

	for(int i=0; i<n; i++)
	{
		int a;
		cin>>a;
		A.push_back(a);
	}

	vector<int> A_front;
	int i=0;
	int cur=0;
	int front_no = b * ceiling(n,2);

	while(cur < front_no)
	{
		if(A[i] + cur >= front_no)
		{
			A_front.push_back(front_no - cur);
			A[i] -= (front_no-cur);

			break;
		}

		A_front.push_back(A[i]);
		cur += A[i];
		A[i]=0;
		i++;
	}

	// for(auto a:A_front) cout << a << " ";
	// cout << endl;

	reverse(all(A));

	// for(auto a:A) cout << a << " ";
	// cout << endl;

	cout << max(solve(A_front,ceiling(n,2)),solve(A,int(n/2))) << endl;
}


#include <bits/stdc++.h>
using namespace std;

const int N = 1e5;
int n, b;
int srodek;
long long d;
int lewo[N + 7];
int prawo[N + 7];
int ostl[N + 7];
int ilel[N + 7];
int ostr[N + 7];
int iler[N + 7];
int ta[N + 7];

int na[N + 7];

void licz_zasiegi() {
  int j = 1;
  for (int i = 1; i <= n; ++i) {
    while (j <= n) {
      long long poz = j;
      poz -= d * i;
      if (poz > i) break;
      lewo[j] = i;
      j++;
    }
  }

  int czas = 1;
  j = n;
  for (int i = n; i > 0; --i, ++czas) {
    while (j > 0) {
      long long poz = j;
      poz += d * czas;
      if (poz < i) break;
      prawo[j] = i;
      j--;
    }
  }

  j = 1;
  int sum = ta[j];
  for (int i = 1; i <= srodek; ++i) {
    while (j + 1 <= n && lewo[j + 1] <= i) {
      j++;
      sum += ta[j];
    }
    ostl[i] = j;
    ilel[i] = sum;
  }

  j = n;
  sum = ta[n];
  for (int i = n; i > srodek; --i) {
    while (j > 1 && prawo[j - 1] >= i) {
      j--;
      sum += ta[j];
    }
    ostr[i] = j;
    iler[i] = sum;
  }
}

int fLewa(int x) {
  int res = 0;
  for (int i = srodek; i > 0; --i) {
    x = min(x, ilel[i]);
    if (x >= b) {
      res++;
      x -= b;
    }
  }
  return srodek - res;
}

int fPrawa(int x) {
  int res = 0;
  for (int i = srodek + 1; i <= n; ++i) {
    x = min(x, iler[i]);
    if (x >= b) {
      res++;
      x -= b;
    }
  }
  return n - srodek - res;
}

int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> d >> b;
  for (int i = 1; i <= n; ++i) cin >> ta[i];

  int sa = 0;
  for (int i = 1; i <= n; ++i) sa += ta[i];

  srodek = (n + 1) / 2;
  licz_zasiegi();

  int pp = 0;
  int kk = sa;

  int wynik = 1e9;
  while (pp <= kk) {
    int s = (pp + kk) / 2;
    int rl = fLewa(s);
    int rp = fPrawa(sa - s);
    wynik = min(wynik, max(rl, rp));
    if (rl > rp) pp = s + 1;
    else kk = s - 1;
  }

  cout << wynik << endl;
  return 0;
}


#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <ctime>
#include <complex>
#include <cassert>
#include <array>
#include <bitset>
#include <unordered_map>

using namespace std;
typedef long long LL;
typedef pair<int,int> P;

const LL M=100*1000+10;
LL a[M];
LL s[M];
LL rem[M];
LL n,d,b;
int main() {
	scanf("%lld%lld%lld",&n,&d,&b);
	for(int i=1;i<=n;i++){
		scanf("%lld",a+i);
		s[i]=s[i-1]+a[i];
	}

	LL x=0,y=0;
	int p=1,q=n;
	while(p<=q){
		if(s[p+p*d+1]-(p-1-x)*b<b){
			x++;
		}
		p++;
		q--;
	}
	reverse(a+1,a+n+1);
	for(int i=1;i<=n;i++){
		s[i]=s[i-1]+a[i];
	}
	p=1;q=n;
	while(p<q){
		if(s[p+p*d+1]-(p-1-y)*b<b){
			y++;
		}
		p++;
		q--;
	}
	printf("%lld\n",max(x,y));

	/*/
	LL low=-1;
	LL hi=(n+1)/2;
	while(low+1<hi){
		LL x=0,y=0;
		int p=1,q=n;
		int r=d;
		LL u=0,v=0;
		while(p<q){
			s[p+d*

			p++;
			q--;
		}
	}
	*/

	return 0;
}


#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <ctime>
#include <complex>
#include <cassert>
#include <array>
#include <bitset>
#include <unordered_map>

using namespace std;
typedef long long LL;
typedef pair<int,int> P;

const LL M=100*1000+10;
LL a[M];
LL s[M];
LL rem[M];
LL n,d,b;
int main() {
	scanf("%lld%lld%lld",&n,&d,&b);
	for(int i=1;i<=n;i++){
		scanf("%lld",a+i);
		s[i]=s[i-1]+a[i];
	}

	LL x=0,y=0;
	int p=1,q=n;
	while(p<=q){
		if(s[min(p+p*d,n)]-(p-1-x)*b<b){
			//cout << p << ", " << p + p*d << endl;
			x++;
		}
		p++;
		q--;
	}
	reverse(a+1,a+n+1);
	for(int i=1;i<=n;i++){
		s[i]=s[i-1]+a[i];
	}
	p=1;q=n;
	while(p<q){
		if(s[min(p+p*d,n)]-(p-1-y)*b<b){
			//cout << n-p+1 << endl;
			y++;
		}
		p++;
		q--;
	}
	printf("%lld\n",max(x,y));

	/*/
	LL low=-1;
	LL hi=(n+1)/2;
	while(low+1<hi){
		LL x=0,y=0;
		int p=1,q=n;
		int r=d;
		LL u=0,v=0;
		while(p<q){
			s[p+d*

			p++;
			q--;
		}
	}
	*/

	return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

long long n,d,b;
long long a[100010];
long long sum[100010];

int main()
{
    scanf("%lld%lld%lld",&n,&d,&b);
    long long ans=100010;
    for (long long i=1; i<=n; i++)
    {
        scanf("%lld",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (long long i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    long long l=1; long long r=n;
    long long pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        //if (n==100000 && d==99999 && b==5000)
            //cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        long long sum1=0;
        for (long long i=1; i<=pos; i++)
        {
            //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"1:"<<endl;
            }
            else
            {
                long long tmp=min((long long)pos,(long long)((long long)i+(long long)i*(long long)d));
                /*if (n==100000 && d==99999 && b==5000 && i==21479)
                {
                    cout<<"1="<<(long long)pos<<endl;
                    cout<<"2="<<(long long)((long long)i+(long long)i*(long long)d)<<endl;
                    cout<<"2:"<<endl;
                    cout<<"tmp="<<tmp<<endl;
                    cout<<"i="<<i<<endl;
                }*/
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        long long sum2=0;
        for (long long i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                long long tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%lld\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>21300)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>21400)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>21000)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i==21479)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                if (n==100000 && d==99999 && b==5000 && i==21479)
                    cout<<"1:"<<endl;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (n==100000 && d==99999 && b==5000 && i==21479)
                    cout<<"2:"<<endl;
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn=100005;
int n,D,B,ans=1e9,a[maxn],b[maxn],c[maxn],res1,res2,res;
bool check(int mid){
  int now=mid;
  for(int i=1;i<=n;i++) c[i]=a[i], b[i]=0;
  for(int i=1;i<=n&&now;i++){
    int t=min(now,c[i]); now-=t; c[i]-=t; b[i]+=t;
  }
  int sum; res1=0,res2=0;
  sum=b[1];
  for(int i=1,lst=1;i<=(n+1)/2;i++){
    while(lst<n&&lst+1-i*D<=i) sum+=b[++lst];
    if(sum<B) b[i+1]+=b[i], b[i]=0, res1++;
    else if(b[i]>=B) b[i+1]+=b[i]-B, b[i]=B, sum-=B;
    else b[lst]+=b[i]-B, b[i]=B, sum-=B;
  }
  sum=c[n];
  for(int i=n,lst=n;i>=(n+1)/2+1;i--){
    while(lst>1&&lst-1+(n-i+1)*D>=i) sum+=c[--lst];
    if(sum<B) c[i-1]+=c[i], c[i]=0, res2++;
    else if(c[i]>=B) c[i-1]+=c[i]-B, c[i]=B, sum-=B;
    else c[lst]+=c[i]-B, c[i]=B, sum-=B;
  }
  ans=min(ans,max(res1,res2));
  return res1>=res2;
}
int main(){
  scanf("%d%d%d",&n,&D,&B);
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
   if (n==100000 && D=1 && B=13)
   {
       for (int i=250; i<500; i++)
       cout<<a[i]<<' ';
       cout<<endl;
   }
  int L=0,R=n*B;
  while(L<=R){
    int mid=(L+R)>>1;
    if(check(mid)) res=mid, L=mid+1; else R=mid-1;
  }
  if(res<n*B) check(res+1);
  printf("%d\n",ans);
  return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        int sl=0; int sr=0;
        //cout<<"pos="<<pos<<endl;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    //if (n==100000 && d==99999 && b==5000 && i>85000)
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        //cout<<"sum1="<<sum1<<endl;
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            //cout<<"i="<<i<<endl;
            //cout<<"a="<<a[i]<<endl;
            if (a[i]>b)
            {
                sr+=a[i]-b;
                //cout<<"1: sr="<<sr<<endl;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                //cout<<"tmp="<<tmp<<endl;
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    //cout<<"i="<<i<<" a="<<a[i]<<endl;
                    sr+=a[i];
                    //cout<<"2: sr="<<sr<<endl;
                }else
                {
                    sr-=b-a[i];
                    //cout<<"3: sr="<<sr<<endl;
                }
             }
        }
        //cout<<"sum2="<<sum2<<endl;
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>25000)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=100005;
int n,D,B,ans=1e9,a[maxn],b[maxn],c[maxn],res1,res2,res;
bool check(int mid){
  int now=mid;
  for(int i=1;i<=n;i++) c[i]=a[i], b[i]=0;
  for(int i=1;i<=n&&now;i++){
    int t=min(now,c[i]); now-=t; c[i]-=t; b[i]+=t;
  }
  int sum; res1=0,res2=0;
  sum=b[1];
  for(int i=1,lst=1;i<=(n+1)/2;i++){
    while(lst<n&&lst+1-i*D<=i) sum+=b[++lst];
    if(sum<B) b[i+1]+=b[i], b[i]=0, res1++;
    else if(b[i]>=B) b[i+1]+=b[i]-B, b[i]=B, sum-=B;
    else b[lst]+=b[i]-B, b[i]=B, sum-=B;
  }
  sum=c[n];
  for(int i=n,lst=n;i>=(n+1)/2+1;i--){
    while(lst>1&&lst-1+(n-i+1)*D>=i) sum+=c[--lst];
    if(sum<B) c[i-1]+=c[i], c[i]=0, res2++;
    else if(c[i]>=B) c[i-1]+=c[i]-B, c[i]=B, sum-=B;
    else c[lst]+=c[i]-B, c[i]=B, sum-=B;
  }
  ans=min(ans,max(res1,res2));
  return res1>=res2;
}
int main(){
  scanf("%d%d%d",&n,&D,&B);
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
  int L=0,R=n*B;
  while(L<=R){
    int mid=(L+R)>>1;
    if(check(mid)) res=mid, L=mid+1; else R=mid-1;
  }
  if(res<n*B) check(res+1);
  printf("%d\n",ans);
  return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        //if (n==100000 && d==99999 && b==5000)
            //cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"1:"<<endl;
            }
            else
            {
                long long tmp=min((long long)pos,(long long)((long long)i+(long long)i*(long long)d));
                /*if (n==100000 && d==99999 && b==5000 && i==21479)
                {
                    cout<<"1="<<(long long)pos<<endl;
                    cout<<"2="<<(long long)((long long)i+(long long)i*(long long)d)<<endl;
                    cout<<"2:"<<endl;
                    cout<<"tmp="<<tmp<<endl;
                    cout<<"i="<<i<<endl;
                }*/
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        //if (n==100000 && d==99999 && b==5000)
            //cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            //if (n==100000 && d==99999 && b==5000 && i>45000)
                    //cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (n==100000 && d==99999 && b==5000 && tmp>100005)
                    cout<<"i="<<i<<endl;
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>22000)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>21470)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>15000)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[10010];
int sum[10010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    int sl=0; int sr=0;
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int pos=lower_bound(sum+1,sum+1+n,n*b/2)-sum;
    int sum1=0;
    for (int i=1; i<=pos; i++)
    {
        //cout<<"i="<<i<<endl;
        if (a[i]>b)
        {
            sl+=a[i]-b;
        }
        else
        {
            int tmp=min(pos,i+i*d);
            //cout<<"tmp="<<tmp<<endl;
            //cout<<"sl="<<sl<<endl;
            //cout<<"hou="<<sum[tmp]-sum[i-1]<<endl;
            if (sum[tmp]-sum[i-1]+sl<b)
            {
                sum1++;
                sl+=a[i];
            }else
            {
                sl-=b-a[i];
            }
        }
        //cout<<"sum="<<sum1<<endl;
    }
    int sum2=0;
    for (int i=n; i>pos; i--)
    {
        if (a[i]>b)
        {
            sr+=a[i]-b;
        }
        else
        {
            int tmp=max(pos,i-d*(n-i+1));
            if (sum[i]-sum[tmp-1]+sr<b)
            {
                sum2++;
                sr+=a[i];
            }else
            {
                sr-=b-a[i];
            }
        }
    }
    printf("%d\n",max(sum1,sum2));
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        //if (n==100000 && d==99999 && b==5000)
            //cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"1:"<<endl;
            }
            else
            {
                long long tmp=min((long long)pos,(long long)(i+i*d));
                if (n==100000 && d==99999 && b==5000 && i==21479)
                {
                    cout<<"1="<<(long long)pos<<endl;
                    cout<<"2="<<(long long)(i+i*d))<<endl;
                    cout<<"2:"<<endl;
                    cout<<"tmp="<<tmp<<endl;
                    cout<<"i="<<i<<endl;
                }
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn=100005;
int n,D,B,ans=1e9,a[maxn],b[maxn],c[maxn],res1,res2,res;
bool check(int mid){
  int now=mid;
  for(int i=1;i<=n;i++) c[i]=a[i], b[i]=0;
  for(int i=1;i<=n&&now;i++){
    int t=min(now,c[i]); now-=t; c[i]-=t; b[i]+=t;
  }
  int sum; res1=0,res2=0;
  sum=b[1];
  for(int i=1,lst=1;i<=(n+1)/2;i++){
    while(lst<n&&lst+1-i*D<=i) sum+=b[++lst];
    if(sum<B) b[i+1]+=b[i], b[i]=0, res1++;
    else if(b[i]>=B) b[i+1]+=b[i]-B, b[i]=B, sum-=B;
    else b[lst]+=b[i]-B, b[i]=B, sum-=B;
  }
  sum=c[n];
  for(int i=n,lst=n;i>=(n+1)/2+1;i--){
    while(lst>1&&lst-1+(n-i+1)*D>=i) sum+=c[--lst];
    if(sum<B) c[i-1]+=c[i], c[i]=0, res2++;
    else if(c[i]>=B) c[i-1]+=c[i]-B, c[i]=B, sum-=B;
    else c[lst]+=c[i]-B, c[i]=B, sum-=B;
  }
  ans=min(ans,max(res1,res2));
  return res1>=res2;
}
int main(){
  scanf("%d%d%d",&n,&D,&B);
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
   if (n==100000 && D==1 && B==13)
   {
       for (int i=250; i<500; i++)
       cout<<a[i]<<' ';
       cout<<endl;
   }
  int L=0,R=n*B;
  while(L<=R){
    int mid=(L+R)>>1;
    if(check(mid)) res=mid, L=mid+1; else R=mid-1;
  }
  if(res<n*B) check(res+1);
  printf("%d\n",ans);
  return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=100005;
int n,D,B,ans=1e9,a[maxn],b[maxn],c[maxn],res1,res2,res;
bool check(int mid){
  int now=mid;
  for(int i=1;i<=n;i++) c[i]=a[i], b[i]=0;
  for(int i=1;i<=n&&now;i++){
    int t=min(now,c[i]); now-=t; c[i]-=t; b[i]+=t;
  }
  int sum; res1=0,res2=0;
  sum=b[1];
  for(int i=1,lst=1;i<=(n+1)/2;i++){
    while(lst<n&&lst+1-i*D<=i) sum+=b[++lst];
    if(sum<B) b[i+1]+=b[i], b[i]=0, res1++;
    else if(b[i]>=B) b[i+1]+=b[i]-B, b[i]=B, sum-=B;
    else b[lst]+=b[i]-B, b[i]=B, sum-=B;
  }
  sum=c[n];
  for(int i=n,lst=n;i>=(n+1)/2+1;i--){
    while(lst>1&&lst-1+(n-i+1)*D>=i) sum+=c[--lst];
    if(sum<B) c[i-1]+=c[i], c[i]=0, res2++;
    else if(c[i]>=B) c[i-1]+=c[i]-B, c[i]=B, sum-=B;
    else c[lst]+=c[i]-B, c[i]=B, sum-=B;
  }
  ans=min(ans,max(res1,res2));
  return res1>=res2;
}
int main(){
  scanf("%d%d%d",&n,&D,&B);
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
   if (n==100000 && D==1 && B==13)
   {
       for (int i=250; i<500; i++)
       cout<<a[i]<<' ';
       cout<<endl;
   }
  int L=0,R=n*B;
  while(L<=R){
    int mid=(L+R)>>1;
    if(check(mid)) res=mid, L=mid+1; else R=mid-1;
  }
  if(res<n*B) check(res+1);
  printf("%d\n",ans);
  return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>21100)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>20900)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[10010];
int sum[10010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    int sl=0; int sr=0;
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int mid;
    int pos;
    while (l<r)
    {
        mid=(l+r)/2;
        if (sum[mid]>b*mid) r=mid;
        else if (sum[mid]<b*mid) l=mid+1;
        else break;
    }
    mid=(l+r)/2;
    if (sum[mid]<b*mid) mid++;
    pos=mid;
    int sum1=0;
    for (int i=1; i<=pos; i++)
    {
        //cout<<"i="<<i<<" a="<<a[i]<<endl;
        if (a[i]>b)
        {
            sl+=a[i]-b;
            //cout<<"1: "<<sl<<endl;
        }
        else
        {
            int tmp=min(pos,i+i*d);
            int l=1;
            //cout<<"tmp="<<tmp<<endl;
            //cout<<"!="<<sum[tmp]-sum[i-1]<<endl;
            //cout<<"sl="<<sl<<endl;
            //cout<<"sl="<<sl<<endl;
            //cout<<"hou="<<sum[tmp]-sum[i-1]<<endl;
            if (sum[tmp]-sum[i-1]+sl<b)
            {
                sum1++;
                sl+=a[i];
                //cout<<"2: "<<sl<<endl;
            }else
            {
                sl-=b-a[i];
                //cout<<"3: "<<sl<<endl;
            }
        }
        //cout<<"sum="<<sum1<<endl;
        //cout<<"sum1="<<sum1<<endl;
    }
    int sum2=0;
    for (int i=n; i>pos; i--)
    {
        if (a[i]>b)
        {
            sr+=a[i]-b;
        }
        else
        {
            int tmp=max(pos,i-d*(n-i+1));
            if (sum[i]-sum[tmp-1]+sr<b)
            {
                sum2++;
                sr+=a[i];
            }else
            {
                sr-=b-a[i];
            }
        }
    }
    printf("%d\n",max(sum1,sum2));
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>20000)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        //if (n==100000 && d==99999 && b==5000)
            //cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"1:"<<endl;
            }
            else
            {
                long long tmp=min((long long)pos,(long long)((long long)i+(long long)i*(long long)d));
                if (n==100000 && d==99999 && b==5000 && i==21479)
                {
                    cout<<"1="<<(long long)pos<<endl;
                    cout<<"2="<<(long long)((long long)i+(long long)i*(long long)d)<<endl;
                    cout<<"2:"<<endl;
                    cout<<"tmp="<<tmp<<endl;
                    cout<<"i="<<i<<endl;
                }
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=100005;
int n,D,B,ans=1e9,a[maxn],b[maxn],c[maxn],res1,res2,res;
bool check(int mid){
  int now=mid;
  for(int i=1;i<=n;i++) c[i]=a[i], b[i]=0;
  for(int i=1;i<=n&&now;i++){
    int t=min(now,c[i]); now-=t; c[i]-=t; b[i]+=t;
  }
  int sum; res1=0,res2=0;
  sum=b[1];
  for(int i=1,lst=1;i<=(n+1)/2;i++){
    while(lst<n&&lst+1-i*D<=i) sum+=b[++lst];
    if(sum<B) b[i+1]+=b[i], b[i]=0, res1++;
    else if(b[i]>=B) b[i+1]+=b[i]-B, b[i]=B, sum-=B;
    else b[lst]+=b[i]-B, b[i]=B, sum-=B;
  }
  sum=c[n];
  for(int i=n,lst=n;i>=(n+1)/2+1;i--){
    while(lst>1&&lst-1+(n-i+1)*D>=i) sum+=c[--lst];
    if(sum<B) c[i-1]+=c[i], c[i]=0, res2++;
    else if(c[i]>=B) c[i-1]+=c[i]-B, c[i]=B, sum-=B;
    else c[lst]+=c[i]-B, c[i]=B, sum-=B;
  }
  ans=min(ans,max(res1,res2));
  return res1>=res2;
}
int main(){
  scanf("%d%d%d",&n,&D,&B);
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
   if (n==100000 && D=1 && B=13)
   {
       for (int i=250; i<500; i++)
       cout<<a[i]<<' ';
       cout<<endl;
   }
  int L=0,R=n*B;
  while(L<=R){
    int mid=(L+R)>>1;
    if(check(mid)) res=mid, L=mid+1; else R=mid-1;
  }
  if(res<n*B) check(res+1);
  printf("%d\n",ans);
  return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn=100005;
int n,D,B,ans=1e9,a[maxn],b[maxn],c[maxn],res1,res2,res;
bool check(int mid){
  int now=mid;
  for(int i=1;i<=n;i++) c[i]=a[i], b[i]=0;
  for(int i=1;i<=n&&now;i++){
    int t=min(now,c[i]); now-=t; c[i]-=t; b[i]+=t;
  }
  int sum; res1=0,res2=0;
  sum=b[1];
  for(int i=1,lst=1;i<=(n+1)/2;i++){
    while(lst<n&&lst+1-i*D<=i) sum+=b[++lst];
    if(sum<B) b[i+1]+=b[i], b[i]=0, res1++;
    else if(b[i]>=B) b[i+1]+=b[i]-B, b[i]=B, sum-=B;
    else b[lst]+=b[i]-B, b[i]=B, sum-=B;
  }
  sum=c[n];
  for(int i=n,lst=n;i>=(n+1)/2+1;i--){
    while(lst>1&&lst-1+(n-i+1)*D>=i) sum+=c[--lst];
    if(sum<B) c[i-1]+=c[i], c[i]=0, res2++;
    else if(c[i]>=B) c[i-1]+=c[i]-B, c[i]=B, sum-=B;
    else c[lst]+=c[i]-B, c[i]=B, sum-=B;
  }
  ans=min(ans,max(res1,res2));
  return res1>=res2;
}
int main(){
  scanf("%d%d%d",&n,&D,&B);
  for(int i=1;i<=n;i++) scanf("%d",&a[i]);
   if (n==100000 && D==1 && B==30)
   {
       for (int i=250; i<500; i++)
       cout<<a[i]<<' ';
       cout<<endl;
   }
  int L=0,R=n*B;
  while(L<=R){
    int mid=(L+R)>>1;
    if(check(mid)) res=mid, L=mid+1; else R=mid-1;
  }
  if(res<n*B) check(res+1);
  printf("%d\n",ans);
  return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    int sl=0; int sr=0;
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                int l=1;
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    if (n==100000 && d==99999 && b==5000 && i>85000)
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=mid+1;
        else if (sum1<sum2) r=mid-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        int sl=0; int sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i==21479)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                if (n==100000 && d==99999 && b==5000 && i==21479)
                    cout<<"1:"<<endl;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (n==100000 && d==99999 && b==5000 && i==21479)
                {
                    cout<<"2:"<<endl;
                    cout<<"tmp="<<tmp<<endl;
                    cout<<"i="<<i<<endl;
                }
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        //if (n==100000 && d==99999 && b==5000)
            //cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
                //if (n==100000 && d==99999 && b==5000 && i==21479)
                    //cout<<"1:"<<endl;
            }
            else
            {
                long long tmp=min((long long)pos,(long long)(i+i*d));
                if (n==100000 && d==99999 && b==5000 && i==21479)
                {
                    cout<<"2:"<<endl;
                    cout<<"tmp="<<tmp<<endl;
                    cout<<"i="<<i<<endl;
                }
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        int sl=0; int sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (n==100000 && d==99999 && b==5000)
                    cout<<"tmp="<<tmp<<endl;
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        int sl=0; int sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        if (n==100000 && d==99999 && b==5000)
                    cout<<"yes"<<endl;
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        long long sl=0; long long sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>21500)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int n,d,b;
int a[100010];
int sum[100010];

int main()
{
    scanf("%d%d%d",&n,&d,&b);
    int ans=100010;
    for (int i=1; i<=n; i++)
    {
        scanf("%d",&a[i]);
    }
    memset(sum,0,sizeof(sum));
    for (int i=1; i<=n; i++)
    {
        sum[i]=sum[i-1]+a[i];
    }
    int l=1; int r=n;
    int pos;
    while (l<=r)
    {
        pos=(l+r)/2;
        if (n==100000 && d==99999 && b==5000)
            cout<<"pos="<<pos<<endl;
        int sl=0; int sr=0;
        int sum1=0;
        for (int i=1; i<=pos; i++)
        {
            if (n==100000 && d==99999 && b==5000 && i>45000)
                    cout<<"i="<<i<<endl;
            if (a[i]>b)
            {
                sl+=a[i]-b;
            }
            else
            {
                int tmp=min(pos,i+i*d);
                if (sum[tmp]-sum[i-1]+sl<b)
                {
                    sum1++;
                    sl+=a[i];
                }else
                {
                    sl-=b-a[i];
                }
            }
        }
        int sum2=0;
        for (int i=n; i>pos; i--)
        {
            if (a[i]>b)
            {
                sr+=a[i]-b;
            }
            else
            {
                int tmp=max(pos,i-d*(n-i+1));
                if (sum[i]-sum[tmp-1]+sr<b)
                {
                    sum2++;
                    sr+=a[i];
                }else
                {
                    sr-=b-a[i];
                }
             }
        }
        ans=min(ans,max(sum1,sum2));
        if (sum1>sum2) l=pos+1;
        else if (sum1<sum2) r=pos-1;
        else break;
    }
    printf("%d\n",ans);
    return 0;
}


/* Author haleyk10198 */
/* �@��:  haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

#define pb push_back

constexpr auto MOD = 1000000007LL;
constexpr auto LINF = (1LL<<60);
constexpr auto INF = 2147483647LL;
constexpr auto PI = 3.1415926535897932384626433;
constexpr auto EPS = 1E-9;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2> p){
	out << p.first << ' ' << p.second;
	return out;
}

template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2> &p){
	in >> p.first >> p.second;
	return in;
}

auto printVector = []<typename T>(ostream& out, vector<T> v){
	copy(v.begin(), v.end(), ostream_iterator<T>(out, " "));
};

int n, d, b, a[100010], ps[100010];

int ask(int l, int r){
	return ps[r]-ps[l];
}

pii solve(int mid){
	int l = 0, r = 0;
	for(int i = 0, j = d, used = 0; i < (n+1)/2; i++, j+=d+1){
		j = min(j, mid);
		if(ask(0, j+1)-used >= b)
			used += b;
		else
			l++;
	}

	for(int i = n-1, j = n-1-d, used = 0; i >= (n+1)/2; i--, j-=(d+1)){
		j = max(j, mid);
		if(ask(j, n)-used >= b)
			used += b;
		else
			r++;
	}
	return pair(l, r);
}

int main(){
	#ifdef LOCAL
		freopen("input.txt","r",stdin);
//		freopen("output.txt","w",stdout);
	#endif
	ios_base::sync_with_stdio(false);

	cin >> n >> d >> b;
	for(int i = 0; i < n; i++)
		cin >> a[i];
	partial_sum(a, a+n, ps+1);

	int l = 0, r = n, res = INF;
	while(l+1 < r){
		int mid = (l+r)/2;

		auto [x, y] = solve(mid);
		res = min(res, max(x, y));

		if(x > y)
			l = mid;
		else
			r = mid;
	}

	cout << res << endl;

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 100005;

int n, b, d;
int a[N];
int liml, limr;

int main() {

	scanf("%d %d %d", &n, &d, &b);

	for(int i = 1; i <= n; i++) scanf("%d", a + i);

	for(int i = 1, s = 0; i <= n; i++) {
		s += a[i];
		if(s >= n / 2 * b) {
			liml = i;
			break;
		}
	}

	for(int i = n, s = 0; i >= 1; i--) {
		s += a[i];
		if(s >= n / 2 * b) {
			limr = i;
			break;
		}
	}

	int l = 0, r = n + 1;
	int sl = 0, sr = 0;

	int totl = 0, totr = 0;
	int ansa = 0, ansb = 0;
	for(int i = 1; i <= n / 2; i++) {
		for(int j = 0; j <= d and (l < liml or r > limr); j++) {
			if(l < liml) {
				l++;
				int tmp = min(n / 2 * b - totl, a[l]);
				if(tmp < 0) tmp = 0;
				a[l] -= tmp;
				sl += tmp;
				totl += tmp;
			}
			if(r > limr) {
				r--;
				int tmp = min(n / 2 * b - totr, a[r]);
				if(tmp < 0) tmp = 0;
				a[r] -= tmp;
				sr += tmp;
				totr += tmp;

			}
		}

		if(sl >= b) sl -= b;
		else ansa++;
		if(sr >= b) sr -= b;
		else ansb++;
	}

	if(n % 2 == 1 and accumulate(a + 1, a + n + 1, sl + sr) < b) ansa++;

	printf("%d\n", max(ansa, ansb));

}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define sf scanf
#define pf printf
#define pb push_back
#define mp make_pair
#define PI ( acos(-1.0) )
#define mod 1000000007
#define IN freopen("nocross.in","r",stdin)
#define OUT freopen("nocross.out","w",stdout)
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG pf("Hi\n")
#define INF 2000000000000000000LL
#define i64 long long int
#define eps (1e-8)
#define xx first
#define yy second
#define LOG 19
#define off 2

using namespace __gnu_pbds;
using namespace std ;

typedef tree< i64, null_type, less< i64 >, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

#define maxn 200005

i64 a[maxn] ;
i64 c[maxn] ;

bool possible(int m,int n, int d, int b)
{
    for(int i=1; i<=n ; i++) c[i] = a[i] ;
    i64 sum = 0 ;
    for(int i=1 ; i<=m ; i++)
    {
        sum += c[i] ;
    }

    for(int i=m+1,r=m+1 ; i<=(n/2) ; i++)
    {
        if(r==i)
        {
            sum += c[i] ;
            c[i] = 0 ;
            r++ ;
        }
        if(sum>=b)
        {
            sum -= b ;
            continue ;
        }

        while( sum<b )
        {
            if( c[r] == 0 ) r++ ;
            int ret = min( b-sum , c[r] ) ;
            sum += ret ; c[r] -= ret ;
            if( 1LL*i*d < (r-i) ) return 0 ;
        }
        sum -= b ;
    }

    for(int i=1; i<=n ; i++) c[i] = a[i] ;
    sum = 0 ;
    for(int i=n ; i>= (n-m+1) ; i--) sum += c[i] ;

    for(int i=n-m,r=n-m ; i>=(n-(n/2)+1) ; i--)
    {
        if(r==i)
        {
            sum += c[r] ;
            c[r] = 0 ;
            r-- ;
        }
        if(b<=sum)
        {
            sum -= b ;
            continue ;
        }
        while(sum<b)
        {
            if(c[r]==0) r-- ;
            int ret = min(b-sum,c[r]) ;
            sum += ret ; c[r] -= ret ;
            if( 1LL*(n-i+1)*d < (i-r) ) return 0 ;
        }
        sum -= b ;
    }
    return true ;
}

int main()
{
    int n , d , b ;

    scanf("%d %d %d",&n,&d,&b) ;

    for(int i=1; i<=n ; i++) scanf("%lld",&a[i]) ;

    int lo = 0 , hi = (n/2) ;

    while( lo<hi )
    {
        int m = (lo+hi)/2 ;

        if( possible(m,n,d,b) ) hi = m ;
        else lo = m+1 ;
    }

    printf("%d\n",lo) ;

    return 0 ;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll,ll> pll;
typedef vector<bool> vb;
const ll oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
#define sz(c) ll((c).size())
#define all(c) begin(c), end(c)
#define FOR(i,a,b) for (ll i = (a); i < (b); i++)
#define FORD(i,a,b) for (ll i = (b)-1; i >= (a); i--)
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define xx first
#define yy second
#define TR(X) ({ if(1) cerr << "TR: " << (#X) << " = " << (X) << endl; })

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	ll n, d, r;
	cin >> n >> d >> r;
	vl a(n);
	FOR(i,0,n) cin >> a[i];

	vl left(n), right(n);
	FOR(i,0,n) {
		if (i > 0) left[i] = left[i-1];
		while (left[i] < i && (i-left[i]+d-1)/d > left[i]+1) left[i]++;
	}
	FOR(i,0,n) right[i] = n-1-left[n-i-1];

	//FOR(i,0,n) cout << left[i] << " ";
	//cout << endl;

	ll xmin = -1, xmax = n/2;
	while (xmax-xmin > 1) {
		ll x = (xmin+xmax)/2;

		vl have = a;

		ll j = 0;
		bool ok = true;
		FOR(i,x,n-x) {
			ll need = r;
			while (need > 0) {
				while (j < n && right[j] < i) j++;
				while (j < n && have[j] == 0) j++;

				if (j == n || left[j] > i) {
					ok = false;
					break;
				}

				ll take = min(have[j],need);
				need -= take;
				have[j] -= take;
			}
		}

		if (ok) xmax = x; else xmin = x;
	}
	cout << xmax << endl;
}


#include <bits/stdc++.h>
#define ID if(1)
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 10;
ll a[maxn] , sum[maxn];
int N , D , B;

int check(int mid){
    // give up [1 ... mid] , [N - mid + 1 ... N]
    // a[mid + 1 , mid + 1 + 1 , .... N - mid - 1 , N - mid]
    int up = N / 2;
    for(int i = mid + 1; i <= up; ++i){ // for first instructor
        int rb = min((ll)N , (ll)i + (ll)i * D);
        ll left_val = sum[i] - (i - mid - 1) * B; // ppl from left
        ll right_val = (sum[rb] - sum[i]); // ppl from right
        if(left_val + right_val < B)return 0;
        int j = N - i + 1; // right index
        int lb = max(1ll , (ll)j - (ll)i * D);
        right_val = sum[N] - sum[j] - (ll)B * (i - mid - 1);
        left_val = sum[j] - sum[lb - 1];
        if(left_val + right_val < B)return 0;
    }
    return 1;
}

int main(){
    scanf("%d %d %d" , &N , &D , &B);
    for(int i = 1; i <= N; ++i){
        scanf("%lld" , &a[i]);
        sum[i] = sum[i - 1] + a[i];
    }
    int l = 0 , r = N / 2 , ans = N / 2;
    while(l <= r){
        int mid = (l + r) >> 1;
        if(check(mid)){
            ans = mid;
            r = mid - 1;
        }
        else{
            l = mid + 1;
        }
    }
    printf("%d\n" , ans);
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned ui;
typedef unsigned long long ul;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pdd;
typedef pair<ul, ul> puu;
typedef vector<int> vi;
#define pb push_back
#define fi first
#define se second
#define ls (i << 1)
#define rs (i << 1 | 1)
#define mid (l + r >> 1)
#define enum(i, j, k) for(int i = j; i <= (k); i ++)
#define open(i, j, k) for(int i = j; i <  (k); i ++)
#define dec(i, j, k)  for(int i = j; i >= (k); i --)
#define ae(x) for(node *p = h[x]; p; p = p->nxt)
#define mfil(x, k) memset(x, k, sizeof x)
#define mcpy(x, y) memcpy(x, y, sizeof x)
#define fio(x) freopen(x".in", "r", stdin); freopen(x".out", "w", stdout)
template <class T> bool chkmin(T &x, T y)
{ return y < x ? (x = y, true) : false; }
template <class T> bool chkmax(T &x, T y)
{ return y > x ? (x = y, true) : false; }
struct __init { __init()
{
    ios::sync_with_stdio(false); cin.tie(0);
    cout.precision(16); cout << fixed;
    srand(time(0) ^ ui(ul(new char)));
} } static __init__;
/* default code ends here */

const int maxn = 1e5 + 10;
int n, d, b;
int a[maxn], sum[maxn];

bool flag[maxn];

int main()
{
	cin >> n >> d >> b;
	enum(i, 1, n)
		cin >> a[i];
	enum(i, 1, n)
		sum[i] = sum[i - 1] + a[i];
	int pen = 0;
	enum(i, 1, (n + 1) / 2)
	{
		int rng = min(ll(n), i + ll(d) * i);
		int num = sum[rng] - sum[i - 1] + pen;
		if(num >= b)
		{
			flag[i] = true;
			pen += a[i] - b;
		}
		else
			pen += a[i];
	}
	pen = 0;
	dec(i, n, (n + 1) / 2 + 1)
	{
		int lng = max(1ll, i - ll(d) * (n - i + 1));
		int num = sum[i] - sum[lng - 1] + pen;
		if(num >= b)
		{
			flag[i] = true;
			pen += a[i] - b;
		}
		else
			pen += a[i];
	}
	int lans = 0, rans = 0;
	enum(i, 1, (n + 1) / 2)
		lans += !flag[i];
	enum(i, (n + 1) / 2, n)
		rans += !flag[i];
	int ans = max(lans, rans);
	cout << ans << '\n';
	return 0;
}


#include <bits/stdc++.h>
#define owo(i,a, n) for(int i=(a); i<n; ++i)
#define uwu(i,a, n) for(int i=n-1; i>=(a); --i)
#define senpai push_back
#define ttgl pair<int, int>
#define ayaya cout<<"debug"<<endl

using namespace std;
using ll = long long;
using ld = long double;
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const int mxN = 100001;
ll arr[mxN];
ll save[mxN];
ll psum[mxN];
ll n, b, d;
int main()
{
    //freopen("filename.in", "r", stdin);
    //freopen("filename.out", "w", stdout);
    cin.tie(0)->sync_with_stdio(0);
    cin>>n>>d>>b;
    psum[0] = 0;
    owo(i, 0, n) {
        cin>>arr[i];
        psum[i+1] = psum[i] + arr[i];
        save[i] = arr[i];
    }
    ll l = 0;
    ll r = n-1;
    while(l<r) {
        ll mid = (l+r)/2;
        bool ok = true;
        //need to check ONLY mid from both sides in continguous interval
        //idea is that we can take all the beginning, then from [mid, (n+1)/2) we are also allowed to have (mid+1)*d in front
        ll left = mid;
        ll right = n-mid-1;
        //cout<<mid<<" "<<left<<" "<<right<<"\n";
        if(right<left) {
            r = mid;
            continue;
        }
        ll tot = 0;
        ll pos = 0;
        for(ll i=left; i<=(n-1)/2; i++) {
            ll fill = i+1-left;
            while(pos<n&&pos<=(ll)((i+1)*d + i)&&tot<fill*b) {
                if(tot+arr[pos]<fill*b) {
                    tot+=arr[pos];
                    arr[pos] = 0;
                    pos++;
                }else {
                    arr[pos]-=fill*b-tot;
                    tot = fill*b;
                }
            }
            //cout<<fill<<" "<<tot<<" "<<pos<<" "<<i<<" hi\n";
            if(tot<fill*b) {
                //cout<<tot<<" "<<fill<<" "<<" hi2\n";
                ok = false;
            }
        }
        /*owo(i, 0, n) {
            cout<<arr[i]<<" ";
        }
        cout<<"\n";*/
        pos = n-1;
        tot = 0;
        for(ll i=right; i>=(n+1)/2; --i) {
            ll fill = right-i+1;
            while(pos>0&&pos>=(ll)(i-(n-i)*d)&&tot<fill*b) {
                if(tot+arr[pos]<fill*b) {
                    tot+=arr[pos];
                    arr[pos] = 0;
                    pos--;
                }else {
                    arr[pos]-=fill*b-tot;
                    tot = fill*b;
                }
                //cout<<pos<<"\n";
            }
            //cout<<fill<<" "<<tot<<" "<<pos<<" "<<i<<" hi\n";
            if(tot<fill*b) {
                //cout<<tot<<" "<<fill<<" hi2\n";
                ok = false;
            }
        }
        owo(i, 0, n) {
            arr[i] = save[i];
        }
        if(ok) {
            r = mid;
        }else {
            l = mid+1;
        }
    }
    cout<<l<<"\n";
    //cout<<((n+1)/2-l)<<"\n";
    return 0;
}


#include <bits/stdc++.h>
#define owo(i,a, n) for(int i=(a); i<n; ++i)
#define uwu(i,a, n) for(int i=n-1; i>=(a); --i)
#define senpai push_back
#define ttgl pair<int, int>
#define ayaya cout<<"debug"<<endl

using namespace std;
using ll = long long;
using ld = long double;
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const int mxN = 100001;
int arr[mxN];
int save[mxN];
int psum[mxN];
int n, b, d;
int main()
{
    //freopen("filename.in", "r", stdin);
    //freopen("filename.out", "w", stdout);
    cin.tie(0)->sync_with_stdio(0);
    cin>>n>>d>>b;
    psum[0] = 0;
    owo(i, 0, n) {
        cin>>arr[i];
        psum[i+1] = psum[i] + arr[i];
        save[i] = arr[i];
    }
    int l = 0;
    int r = n-1;
    while(l<r) {
        int mid = (l+r)/2;
        bool ok = true;
        //need to check ONLY mid from both sides in continguous interval
        //idea is that we can take all the beginning, then from [mid, (n+1)/2) we are also allowed to have (mid+1)*d in front
        int left = mid;
        int right = n-mid-1;
        //cout<<mid<<" "<<left<<" "<<right<<"\n";
        if(right<left) {
            r = mid;
            continue;
        }
        int tot = 0;
        ll pos = 0;
        for(int i=left; i<=(n-1)/2; i++) {
            int fill = i+1-left;
            while(pos<n&&pos<=(ll)((i+1)*d + i)&&tot<fill*b) {
                if(tot+arr[pos]<fill*b) {
                    tot+=arr[pos];
                    arr[pos] = 0;
                    pos++;
                }else {
                    arr[pos]-=fill*b-tot;
                    tot = fill*b;
                }
            }
            //cout<<fill<<" "<<tot<<" "<<pos<<" "<<i<<" hi\n";
            if(tot<fill*b) {
                //cout<<tot<<" "<<fill<<" "<<" hi2\n";
                ok = false;
            }
        }
        /*owo(i, 0, n) {
            cout<<arr[i]<<" ";
        }
        cout<<"\n";*/
        pos = n-1;
        tot = 0;
        for(int i=right; i>=(n+1)/2; --i) {
            int fill = right-i+1;
            while(pos>0&&pos>=(ll)(i-(n-i)*d)&&tot<fill*b) {
                if(tot+arr[pos]<fill*b) {
                    tot+=arr[pos];
                    arr[pos] = 0;
                    pos--;
                }else {
                    arr[pos]-=fill*b-tot;
                    tot = fill*b;
                }
                //cout<<pos<<"\n";
            }
            //cout<<fill<<" "<<tot<<" "<<pos<<" "<<i<<" hi\n";
            if(tot<fill*b) {
                //cout<<tot<<" "<<fill<<" hi2\n";
                ok = false;
            }
        }
        owo(i, 0, n) {
            arr[i] = save[i];
        }
        if(ok) {
            r = mid;
        }else {
            l = mid+1;
        }
    }
    cout<<l<<"\n";
    //cout<<((n+1)/2-l)<<"\n";
    return 0;
}


#include <bits/stdc++.h>
#define owo(i,a, n) for(int i=(a); i<n; ++i)
#define uwu(i,a, n) for(int i=n-1; i>=(a); --i)
#define senpai push_back
#define ttgl pair<int, int>
#define ayaya cout<<"debug"<<endl

using namespace std;
using ll = long long;
using ld = long double;
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const int mxN = 100001;
int arr[mxN];
int save[mxN];
int psum[mxN];
int n, b, d;
int main()
{
    //freopen("filename.in", "r", stdin);
    //freopen("filename.out", "w", stdout);
    cin.tie(0)->sync_with_stdio(0);
    cin>>n>>d>>b;
    psum[0] = 0;
    owo(i, 0, n) {
        cin>>arr[i];
        psum[i+1] = psum[i] + arr[i];
        save[i] = arr[i];
    }
    int l = 0;
    int r = n-1;
    while(l<r) {
        int mid = (l+r)/2;
        bool ok = true;
        //need to check ONLY mid from both sides in continguous interval
        //idea is that we can take all the beginning, then from [mid, (n+1)/2) we are also allowed to have (mid+1)*d in front
        int left = mid;
        int right = n-mid-1;
        //cout<<mid<<" "<<left<<" "<<right<<"\n";
        if(right<left) {
            r = mid;
            continue;
        }
        int tot = 0;
        int pos = 0;
        for(int i=left; i<=(n-1)/2; i++) {
            int fill = i+1-left;
            while(pos<n&&pos<=(i+1)*d + i&&tot<fill*b) {
                if(tot+arr[pos]<fill*b) {
                    tot+=arr[pos];
                    arr[pos] = 0;
                    pos++;
                }else {
                    arr[pos]-=fill*b-tot;
                    tot = fill*b;
                }
            }
            //cout<<fill<<" "<<tot<<" "<<pos<<" "<<i<<" hi\n";
            if(tot<fill*b) {
                //cout<<tot<<" "<<fill<<" "<<" hi2\n";
                ok = false;
            }
        }
        /*owo(i, 0, n) {
            cout<<arr[i]<<" ";
        }
        cout<<"\n";*/
        pos = n-1;
        tot = 0;
        for(int i=right; i>=(n+1)/2; --i) {
            int fill = right-i+1;
            while(pos>0&&pos>=i-(n-i)*d&&tot<fill*b) {
                if(tot+arr[pos]<fill*b) {
                    tot+=arr[pos];
                    arr[pos] = 0;
                    pos--;
                }else {
                    arr[pos]-=fill*b-tot;
                    tot = fill*b;
                }
                //cout<<pos<<"\n";
            }
            //cout<<fill<<" "<<tot<<" "<<pos<<" "<<i<<" hi\n";
            if(tot<fill*b) {
                //cout<<tot<<" "<<fill<<" hi2\n";
                ok = false;
            }
        }
        owo(i, 0, n) {
            arr[i] = save[i];
        }
        if(ok) {
            r = mid;
        }else {
            l = mid+1;
        }
    }
    cout<<l<<"\n";
    //cout<<((n+1)/2-l)<<"\n";
    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
#include "bits/stdc++.h"
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
const int MOD=1000000007;
#define endl "\n"
#define fst first
#define snd second
const int UNDEF = -1;
const int INF=1<<30;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true : false; }
template<typename T> inline bool chkmin(T &aa, T bb) { return aa > bb ? aa = bb, true : false; }
typedef pair<ll,ll> pll;typedef vector<ll> vll;typedef pair<int,int> pii;typedef vector<int> vi;typedef vector<vi> vvi;
#ifdef ONLINE_JUDGE
#define assert(XXX) XXX
#else
#define DEBUG_CAT
#endif
#ifdef DEBUG_CAT
#define dbg(...)   printf( __VA_ARGS__ )
#else
#define dbg(...)   /****nothing****/
#endif
int rint();char rch();long long rlong();
int n,d,b;
const int mn=1e5+4;
int a[mn];
ll pre[mn];
ll query(int l, int r) {
  return pre[r]-pre[l-1];
}
bool f(int imid) {
  int ans=0;
  int lbad=1+(imid-1);
  int rbad=n-(imid-1);
  {
    int t=1;
    for (int l=lbad+1;l<=(n+1)/2;l++) {
      //if (imid==2) printf("l:%d\n",l);
      if (query(1,min(l+l*(ll)d,(ll)n))<t*(ll)b) return false;
      t++;
    }
  }
  {
    int t=1;
    for (int r=rbad-1;r>(n+1)/2;r--) {
      if (query(max(r-(n+1-r)*(ll)d,1LL),n)<t*(ll)b) return false;
      t++;
    }
  }
  return true;
}
int main()
{
  ios_base::sync_with_stdio(false); cin.tie(0);
  n=rint(),d=rint(),b=rint();
  for (int x=1;x<=n;x++) a[x]=rint();
  for (int x=1;x<=n;x++) pre[x]=pre[x-1]+a[x];
  int imin=0,imax=((n+1)/2)+1;
  while(imin<imax) {
    int imid=(imin+imax)>>1;
    if (!f(imid)) imin=imid+1;
    else imax=imid;
  }
  printf("%d\n",imin);
}

static char stdinBuffer[1024];
static char* stdinDataEnd = stdinBuffer + sizeof (stdinBuffer);
static const char* stdinPos = stdinDataEnd;

void readAhead(size_t amount)
{
    size_t remaining = stdinDataEnd - stdinPos;
    if (remaining < amount) {
       memmove(stdinBuffer, stdinPos, remaining);
       size_t sz = fread(stdinBuffer + remaining, 1, sizeof (stdinBuffer) - remaining, stdin);
       stdinPos = stdinBuffer;
       stdinDataEnd = stdinBuffer + remaining + sz;
       if (stdinDataEnd != stdinBuffer + sizeof (stdinBuffer))
         *stdinDataEnd = 0;
    }
}

int rint()
{
    readAhead(16);

    int x = 0;
    bool neg = false;
    while(*stdinPos==' '||*stdinPos=='\n') ++stdinPos;
    if (*stdinPos == '-') {
       ++stdinPos;
       neg = true;
    }

    while (*stdinPos >= '0' && *stdinPos <= '9') {
       x *= 10;
       x += *stdinPos - '0';
       ++stdinPos;
    }

    return neg ? -x : x;
}
char rch()
{
    readAhead(16);
    while(*stdinPos==' '||*stdinPos=='\n') ++stdinPos;
    char ans=*stdinPos;
    ++stdinPos;
    return ans;
}
long long rlong()
{
    readAhead(32);

    long long x = 0;
    bool neg = false;
    while(*stdinPos==' '||*stdinPos=='\n') ++stdinPos;
    if (*stdinPos == '-') {
       ++stdinPos;
       neg = true;
    }

    while (*stdinPos >= '0' && *stdinPos <= '9') {
       x *= 10;
       x += *stdinPos - '0';
       ++stdinPos;
    }

    return neg ? -x : x;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
#include "bits/stdc++.h"
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
const int MOD=1000000007;
#define endl "\n"
#define fst first
#define snd second
const int UNDEF = -1;
const int INF=1<<30;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true : false; }
template<typename T> inline bool chkmin(T &aa, T bb) { return aa > bb ? aa = bb, true : false; }
typedef pair<ll,ll> pll;typedef vector<ll> vll;typedef pair<int,int> pii;typedef vector<int> vi;typedef vector<vi> vvi;
#ifdef ONLINE_JUDGE
#define assert(XXX) XXX
#else
#define DEBUG_CAT
#endif
#ifdef DEBUG_CAT
#define dbg(...)   printf( __VA_ARGS__ )
#else
#define dbg(...)   /****nothing****/
#endif
int rint();char rch();long long rlong();
int n,d,b;
const int mn=1e5+4;
int a[mn];
ll pre[mn];
ll query(int l, int r) {
  return pre[r]-pre[l-1];
}
bool f(int imid) {
  int ans=0;
  int lbad=1+(imid-1);
  int rbad=n-1-(imid-1);
  {
    int t=1;
    for (int l=lbad+1;l<=(n+1)/2;l++) {
      //if (imid) printf("l:%d\n",l);
      if (query(1,min(l+t*(ll)d,(ll)n))<t*(ll)b) return false;
      t++;
    }
  }
  {
    int t=1;
    for (int r=rbad-1;r>(n+1)/2;r--) {
      //if (imid) printf("r:%d\n",r);
      if (query(max(r-t*(ll)d,1LL),n)<t*(ll)b) return false;
      t++;
    }
  }
  return true;
}
int main()
{
  ios_base::sync_with_stdio(false); cin.tie(0);
  n=rint(),d=rint(),b=rint();
  for (int x=1;x<=n;x++) a[x]=rint();
  for (int x=1;x<=n;x++) pre[x]=pre[x-1]+a[x];
  int imin=0,imax=((n+1)/2)+1;
  while(imin<imax) {
    int imid=(imin+imax)>>1;
    if (!f(imid)) imin=imid+1;
    else imax=imid;
  }
  printf("%d\n",imin);
}

static char stdinBuffer[1024];
static char* stdinDataEnd = stdinBuffer + sizeof (stdinBuffer);
static const char* stdinPos = stdinDataEnd;

void readAhead(size_t amount)
{
    size_t remaining = stdinDataEnd - stdinPos;
    if (remaining < amount) {
       memmove(stdinBuffer, stdinPos, remaining);
       size_t sz = fread(stdinBuffer + remaining, 1, sizeof (stdinBuffer) - remaining, stdin);
       stdinPos = stdinBuffer;
       stdinDataEnd = stdinBuffer + remaining + sz;
       if (stdinDataEnd != stdinBuffer + sizeof (stdinBuffer))
         *stdinDataEnd = 0;
    }
}

int rint()
{
    readAhead(16);

    int x = 0;
    bool neg = false;
    while(*stdinPos==' '||*stdinPos=='\n') ++stdinPos;
    if (*stdinPos == '-') {
       ++stdinPos;
       neg = true;
    }

    while (*stdinPos >= '0' && *stdinPos <= '9') {
       x *= 10;
       x += *stdinPos - '0';
       ++stdinPos;
    }

    return neg ? -x : x;
}
char rch()
{
    readAhead(16);
    while(*stdinPos==' '||*stdinPos=='\n') ++stdinPos;
    char ans=*stdinPos;
    ++stdinPos;
    return ans;
}
long long rlong()
{
    readAhead(32);

    long long x = 0;
    bool neg = false;
    while(*stdinPos==' '||*stdinPos=='\n') ++stdinPos;
    if (*stdinPos == '-') {
       ++stdinPos;
       neg = true;
    }

    while (*stdinPos >= '0' && *stdinPos <= '9') {
       x *= 10;
       x += *stdinPos - '0';
       ++stdinPos;
    }

    return neg ? -x : x;
}


#include<bits/stdc++.h>

#define ll long long
#define ld double
#define endl "\n"
#define fi first
#define se second
#define y1 sadjfskldf
#define sqr(asdf) ((asdf) * (asdf))
using namespace std;

const ll N = 5e5 + 200;
const ll MOD = 1e9 + 7;
ll a[N],b[N],t,l,r,pl,pr,n,debt,d,B,x;
bool check(ll L,ll R)
{
    for(int i = 1; i <= n; i++) b[i] = a[i];
    t = 0;
    l = pl = 1;
    r = pr = n;
    while(l <= r)
    {
        t++;
//        cout<<l<<" | "<<r<<endl;
        if(l >= L && r <= R)
        {
//            cout<<l<<" - ";
            debt = B;
            while(debt)
            {
                if(pl > n || abs(l - pl) > t * d) return 0;
                x = min(b[pl], debt);
                b[pl] -= x;
                debt -= x;
                if(b[pl] < 1) pl++;
            }
//            cout<<pl<<endl;
        }
        if(l != r && r >= L && r <= R)
        {
//            cout<<r<<" - ";
            debt = B;
            while(debt)
            {
                if(pr < 1 || abs(r - pr) > t * d) return 0;
                x = min(b[pr], debt);
                b[pr] -= x;
                debt -= x;
                if(b[pr] < 1) pr--;
            }
//            cout<<pr<<endl;
        }
        l++;
        r--;
    }
    return 1;
}
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin>>n>>d>>B;
    for(int i = 1; i <= n; i++) cin>>a[i];
    ll l,r,c;
    l = 0;
    r = n / 2;
    while(l < r)
    {
        c = (l + r) / 2;
//        cout<<l<<" "<<r<<" "<<c<<endl;
        if(check(1 + c, n - c)) r = c;
        else l = c + 1;
    }
//    cout<<check(1, n)<<endl;
    cout<<l<<endl;
    return 0;
}


/*input
100 2 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3 1 2 8 5 1 9 1 2 12 7 5 0 7 2 11 3 17
*/

#include <bits/stdc++.h>
#include <unistd.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define rep(i,j,n) for(i=j;i<n;i++)
#define repi(i,j,n) for(i=j;i>n;i--)
#define inf 1e18
#define M 1000000007
#define pie 3.141592653589793238
#define ll long long
#define ld long double
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define UQ(x) (x).resize(distance((x).begin(),unique(all((x)))))

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rnd64(chrono::high_resolution_clock::now().time_since_epoch().count());

ll power(ll a,ll m,ll mod){
    ll ans=1;
    while(m){
        if(m%2){
            ans*=a;
            ans%=(mod);
        }
        a=(a*a)%(mod);
        m>>=1;
    }
    return ans;
}

void init(ll* a,ll n,ll val){
    for(ll i=0;i<n;i++)
        a[i]=val;
}

ll b;

void func(vll v,vll &pre,ll &f,ll d,ll how,ll n){
    ll i,j=0,d1=d;
    rep(i,0,how){
        if(j==i)j++;
        if(v[i]>=b){
            v[i+1]+=v[i]-b;
            f++;
            continue;
        }
        ll tmp=pre[(ll)min(n-1,i+d)]-pre[j]+v[j];
        if(tmp+v[i]>=b){
            while(v[j]+v[i]<b){
                v[i]+=v[j];
                j++;
            }
            v[j]-=b-v[i];
            v[i]=b;
            f++;
            continue;
        }
        v[i+1]+=v[i];
        v[i]=0;
        d+=d1;
        d=min(d,n-1);
    }
}

void solve(){
    ll i,j,_;
    ll n,d;
    cin>>n>>d>>b;
    vll a(n);
    rep(i,0,n)cin>>a[i];
    vll pre(n);
    pre[0]=a[0];
    rep(i,1,n)pre[i]=pre[i-1]+a[i];
    ll f=0,s=0;
    func(a,pre,f,d,(n+1)/2,n);
    reverse(a.begin(),a.end());
    pre[0]=a[0];
    rep(i,1,n)pre[i]=pre[i-1]+a[i];
    func(a,pre,s,d,n/2,n);
    cout<<max((n+1)/2-f,n/2-s)<<endl;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll T=1;
   // cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


/*input
100 2 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3 1 2 8 5 1 9 1 2 12 7 5 0 7 2 11 3 17
*/

#include <bits/stdc++.h>
#include <unistd.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define rep(i,j,n) for(i=j;i<n;i++)
#define repi(i,j,n) for(i=j;i>n;i--)
#define inf 1e18
#define M 1000000007
#define pie 3.141592653589793238
#define ll long long
#define ld long double
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define UQ(x) (x).resize(distance((x).begin(),unique(all((x)))))

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rnd64(chrono::high_resolution_clock::now().time_since_epoch().count());

ll power(ll a,ll m,ll mod){
    ll ans=1;
    while(m){
        if(m%2){
            ans*=a;
            ans%=(mod);
        }
        a=(a*a)%(mod);
        m>>=1;
    }
    return ans;
}

void init(ll* a,ll n,ll val){
    for(ll i=0;i<n;i++)
        a[i]=val;
}

ll n,b;

void func(vll v,vll &pre,ll &f,ll d,ll how){
    ll i,j=0,d1=d;
    d=0;
    rep(i,0,how){
        d+=d1;
        if(j==i)j++;
        if(v[i]>=b){
            v[i+1]+=v[i]-b;
            f++;
            continue;
        }
        ll tmp=pre[(ll)min(n-1,i+d)]-pre[j]+v[j];
        assert(tmp>=0);
        if(tmp+v[i]>=b){
            while(v[j]+v[i]<b){
                v[i]+=v[j];
                v[j]=0;
                j++;
            }
            v[j]-=b-v[i];
            v[i]=b;
            f++;
            continue;
        }
        v[i+1]+=v[i];
        v[i]=0;
    }
}

void solve(){
    ll i,j,_;
    ll d;
    cin>>n>>d>>b;
    vll a(n);
    rep(i,0,n)cin>>a[i];
    vll pre(n);
    pre[0]=a[0];
    rep(i,1,n)pre[i]=pre[i-1]+a[i];
    ll f=0,s=0;
    func(a,pre,f,d,(n+1)/2);
    reverse(a.begin(),a.end());
    pre[0]=a[0];
    rep(i,1,n)pre[i]=pre[i-1]+a[i];
    func(a,pre,s,d,n/2);
    cout<<max((n+1)/2-f,n/2-s)<<endl;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll T=1;
   // cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


/*input
100 2 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 3 1 2 8 5 1 9 1 2 12 7 5 0 7 2 11 3 17
*/

#include <bits/stdc++.h>
#include <unistd.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define rep(i,j,n) for(i=j;i<n;i++)
#define repi(i,j,n) for(i=j;i>n;i--)
#define inf 1e18
#define M 1000000007
#define pie 3.141592653589793238
#define ll long long
#define ld long double
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define UQ(x) (x).resize(distance((x).begin(),unique(all((x)))))

using namespace std;
using namespace __gnu_pbds;

template<typename T>
using ordered_set=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rnd64(chrono::high_resolution_clock::now().time_since_epoch().count());

ll power(ll a,ll m,ll mod){
    ll ans=1;
    while(m){
        if(m%2){
            ans*=a;
            ans%=(mod);
        }
        a=(a*a)%(mod);
        m>>=1;
    }
    return ans;
}

void init(ll* a,ll n,ll val){
    for(ll i=0;i<n;i++)
        a[i]=val;
}

ll n,b;

void func(vll v,vll &pre,ll &f,ll d,ll how){
    ll i,j=0,d1=d;
    d=0;
    rep(i,0,how){
        d+=d1;
        d=min(d,n-1);
        if(j==i)j++;
        if(v[i]>=b){
            v[i+1]+=v[i]-b;
            f++;
            continue;
        }
        ll tmp=pre[(ll)min(n-1,i+d)]-pre[j]+v[j];
        if(tmp+v[i]>=b){
            while(v[j]+v[i]<b){
                v[i]+=v[j];
                j++;
            }
            v[j]-=b-v[i];
            v[i]=b;
            f++;
            continue;
        }
        v[i+1]+=v[i];
        v[i]=0;
    }
}

void solve(){
    ll i,j,_;
    ll d;
    cin>>n>>d>>b;
    vll a(n);
    rep(i,0,n)cin>>a[i];
    vll pre(n);
    pre[0]=a[0];
    rep(i,1,n)pre[i]=pre[i-1]+a[i];
    ll f=0,s=0;
    func(a,pre,f,d,(n+1)/2);
    reverse(a.begin(),a.end());
    pre[0]=a[0];
    rep(i,1,n)pre[i]=pre[i-1]+a[i];
    func(a,pre,s,d,n/2);
    cout<<max((n+1)/2-f,n/2-s)<<endl;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll T=1;
   // cin>>T;
    while(T--){
        solve();
    }
    return 0;
}