#yuki1090 n,d=map(int,input().split()) a=list(map(int,input().split())) res=[0] x=0 for i in a: x+=i res.append(max(x,res[-1]+d)) print(*res)