N, D = map(int, input().split()) A = list(map(int, input().split())) B = [0] for a in A: B.append(B[-1] + a) for i in range(1, N): B[i] = max(B[i], B[i-1] + D) print(*B)