l = list(map(int, input().rstrip().split()))
m = list(map(int, input().rstrip().split()))
g=0
r=0
for i in range(l[0]):
    if ((m[i]-r)%l[1]==0):
        g+=m[i]//l[1]
        r=0
    else:
        g += (m[i] // l[1])+1
        r=m[i]%l[1]
print(g)