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