N, D = map(int, input().split()) a = list(map(int, input().split())) x = [0] * N for i, n in enumerate(a): x[i+1] = x[i] + n for i in range(N-1): if x[i+1] - x[i] < D: x[i+1] = x[i] + D print(*x)