from itertools import accumulate n, d = map(int, input().split()) a = [0] + list(map(int, input().split())) x = list(accumulate(a)) for i in range(n - 1): x[i+1] = max(x[i] + d, x[i+1]) print(*x)