
n,k=input().split(' ')
n=int(n)
k=int(k)
arr = input().split(' ')
Ans = 0;
remain = 0;
for i in range(0,n):
	temp = (remain + int(arr[i])) // k;
	remain = (remain + int(arr[i])) // k - temp;
	Ans += temp;
if remain != 0:
	++Ans
print(Ans)
 			    	 				        				   	