N, D = map(int,input().split()) *inp,=map(int,input().split()) ichi=[0] for j in range(N-1): ichi.append(ichi[j]+inp[j]) for i in range(N-1): if ichi[i+1] - ichi[i] < D: ichi[i+1] = ichi[i] + D for k in ichi: print(k,end=' ')