'''

4 4
2 8 4 1



'''
ans = 0;
o=input().rstrip().split(' ')
p=input().rstrip().split(' ')
p.sort(key=int,reverse=True)
k=int(o[1])
for i in range(0,len(p)-1):
    if int(p[i])==0:
        continue;
    if int(p[i]) <= k:
        ans+=1;
        A=0;
    else:
        ans+=1;
        A=int(p[i]) - k;
        p[i+1] = int(p[i+1]) + A;
if int(p[len(p)-1]) != 0:
    if int(p[len(p)-1]) <= k:
        ans+=1;
    else:
        ans+=(int(p[len(p)-1])//k)
print(ans)