N,D=map(int,input().split()) a=[0]+[*map(int,input().split())] b=[0] for i in range(1,N): a[i]+=a[i-1] b.append(max(D+b[i-1],a[i])) print(*b)