n,d = map(int,input().split()) a = list(map(int,input().split())) dist = [0] for i in range(n-1): dist.append(dist[i]+a[i]) for i in range(1,n): if dist[i] - dist[i-1] < d: dist[i] = dist[i-1] + d for i in dist: print(i, end=" ")