n,d=map(int,input().split()) A=[int(i) for i in input().split()] Ans=[0] for a in A: Ans.append(a+Ans[-1]) for i in range(1,n): if Ans[i]-Ans[i-1]