N, D = map(int, input().split()) A = list(map(int, input().split())) ans = [0] x = 0 for a in A: x+=a print(x) if x-ans[-1]