import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**7)

from collections import Counter, deque

#from collections import defaultdict

from itertools import combinations, permutations, accumulate, groupby, product

from bisect import bisect_left,bisect_right

from heapq import heapify, heappop, heappush

from math import floor, ceil,pi

#from operator import itemgetter

def I(): return int(eval(input()))

def MI(): return list(map(int, input().split()))

def LI(): return list(map(int, input().split()))

def LI2(): return [int(eval(input())) for i in range(n)]

def MXI(): return [LI()for i in range(n)]

inf = 10**17

mod = 10**9 + 7



n=I()

A=LI()

sm=0

ans=[0 for i in range(n)]

for i in range((n-1)//2):

    sm+=2*A[2*i+1]

ans[0]=sum(A)-sm

for i in range(n-1):

    ans[i+1]=-ans[i]+2*A[i]

print((*ans))
#float型を許すな

#numpyはpythonで

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**7)

from collections import Counter, deque

from collections import defaultdict

from itertools import combinations, permutations, accumulate, groupby, product

from bisect import bisect_left,bisect_right

from heapq import heapify, heappop, heappush

from math import floor, ceil,pi,factorial

from operator import itemgetter

def I(): return int(eval(input()))

def MI(): return list(map(int, input().split()))

def LI(): return list(map(int, input().split()))

def LI2(): return [int(eval(input())) for i in range(n)]

def MXI(): return [[LI()]for i in range(n)]

def SI(): return input().rstrip()

def printns(x): print(('\n'.join(x)))

def printni(x): print(('\n'.join(list(map(str,x)))))

inf = 10**17

mod = 10**9 + 7



n=I()

lis=LI()

ans=[0 for i in range(n)]

u=0

for i in range(n):

    if i%2==0:

        u+=lis[i]

    else:

        u-=lis[i]

u=u//2

ans[0]=u

#print(u)

for i in range(n-1):

    ans[i+1]=-ans[i]+lis[i]

for i in range(n):

    ans[i]*=2

print((*ans))

        
import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque

# from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left, bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil, pi

# from operator import itemgetter
def I():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def LI():
    return list(map(int, input().split()))


def LI2():
    return [int(eval(input())) for i in range(n)]


def MXI():
    return [LI() for i in range(n)]


inf = 10**17
mod = 10**9 + 7
n = I()
A = LI()
sm = 0
ans = [0 for i in range(n)]
for i in range((n - 1) // 2):
    sm += 2 * A[2 * i + 1]
ans[0] = sum(A) - sm
for i in range(n - 1):
    ans[i + 1] = -ans[i] + 2 * A[i]
print((*ans))

# float型を許すな
# numpyはpythonで
import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left, bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil, pi, factorial
from operator import itemgetter


def I():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def LI():
    return list(map(int, input().split()))


def LI2():
    return [int(eval(input())) for i in range(n)]


def MXI():
    return [[LI()] for i in range(n)]


def SI():
    return input().rstrip()


def printns(x):
    print(("\n".join(x)))


def printni(x):
    print(("\n".join(list(map(str, x)))))


inf = 10**17
mod = 10**9 + 7
n = I()
lis = LI()
ans = [0 for i in range(n)]
u = 0
for i in range(n):
    if i % 2 == 0:
        u += lis[i]
    else:
        u -= lis[i]
u = u // 2
ans[0] = u
# print(u)
for i in range(n - 1):
    ans[i + 1] = -ans[i] + lis[i]
for i in range(n):
    ans[i] *= 2
print((*ans))

+# float型を許すな +# numpyはpythonで - -# from collections import defaultdict +from collections import defaultdict -from math import floor, ceil, pi +from math import floor, ceil, pi, factorial +from operator import itemgetter -# from operator import itemgetter + -    return [LI() for i in range(n)] +    return [[LI()] for i in range(n)] + + +def SI(): +    return input().rstrip() + + +def printns(x): +    print(("\n".join(x))) + + +def printni(x): +    print(("\n".join(list(map(str, x))))) -A = LI() -sm = 0 +lis = LI() -for i in range((n - 1) // 2): -    sm += 2 * A[2 * i + 1] -ans[0] = sum(A) - sm +u = 0 +for i in range(n): +    if i % 2 == 0: +        u += lis[i] +    else: +        u -= lis[i] +u = u // 2 +ans[0] = u +# print(u) -    ans[i + 1] = -ans[i] + 2 * A[i] +    ans[i + 1] = -ans[i] + lis[i] +for i in range(n): +    ans[i] *= 2