n,k=map(int,input().split())
a=list(map(int,input().split()))
l=0
h=0
z=0
for i in range(len(a)):
    if(i%2==1):
        h+=a[i]
        if(h<k):
            l+=1
        else:
            l+=h//k
            h=h%k
    else:
        h+=a[i]
if(h%k==0):
    print(l+h//k)
else:
    print(l+1)
