N = int(raw_input()) li = raw_input().split() a,b = int(li[0]),int(li[1]) for i in range(2, N-1): a,b = b,a + int(li[i]) print b