n,k = map(int,input().split())
a = list(map(int,input().split()))
bag = n-1
for i in range(n-1):
    if(a[i]>k):
        a[n-1] += (a[i]-k)
    elif(a[i]==0):
        bag -= 1
if(a[n-1]<=k):
    bag += 1
else:
    bag += (a[n-1]//k)
print(bag)