N, D = map(int, input().split()) A = list(map(int, input().split())) X = [0] for i in range(N - 1): X.append(X[-1] + A[i]) for i in range(1, N): if X[i] - X[i - 1] >= D: continue else: X[i] = X[i - 1] + D print(*X)