import sys readline=sys.stdin.readline write=sys.stdout.write from math import gcd as GCD import math N,D=map(int,readline().split()) A=[0]+list(map(int,readline().split())) for i in range(1,N): A[i]+=A[i-1] for i in range(1,N): A[i]=max(A[i],A[i-1]+D) print(*A)