n, d = map(int, input().split()) alst = list(map(int, input().split())) ans = [0] pos = 0 for num in alst: pos += num ans.append(max(pos, ans[-1] + d)) print(*ans)