n, d = map(int, input().split()) b = list(map(int, input().split())) a = [0] * n for i in range(1, n): a[i] = a[i - 1] + b[i - 1] for i in range(n): if i != 0: a[i] = max(a[i], a[i - 1] + d) print(a[i], end=' ' if i != n - 1 else '\n')