N,D=map(int, input().split()) a=[int(i) for i in input().split()] b=[0] for i in range(0,len(a)): b.append(a[i]+b[i]) for i in range(1,len(b)): if b[i]-b[i-1] < D: b[i]=b[i-1]+D print(*b)