import sys



def main():

    input = sys.stdin.readline

    N = int(input())

    A = list(map(int, input().split()))



    ans = [0] * N

    for i, a in enumerate(A):

        ans[0] += (-1)**i * a



    for i in range(1, N):

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



    for a in ans:

        print(a, end=' ')

    print('')





if __name__ == '__main__':

    main()

import sys

sys.setrecursionlimit(10**6)



def main():

    input = sys.stdin.readline

    N = int(eval(input()))

    A = list(map(int, input().split()))



    ans = [0] * N

    sign = -1

    for a in A:

        sign *= -1

        ans[0] += sign * a



    for i in range(1, N):

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



    print((' '.join(map(str, ans))))





if __name__ == '__main__':

    main()

import sys


def main():
    input = sys.stdin.readline
    N = int(input())
    A = list(map(int, input().split()))
    ans = [0] * N
    for i, a in enumerate(A):
        ans[0] += (-1) ** i * a
    for i in range(1, N):
        ans[i] = A[i - 1] * 2 - ans[i - 1]
    for a in ans:
        print(a, end=" ")
    print("")


if __name__ == "__main__":
    main()

import sys

sys.setrecursionlimit(10**6)


def main():
    input = sys.stdin.readline
    N = int(eval(input()))
    A = list(map(int, input().split()))
    ans = [0] * N
    sign = -1
    for a in A:
        sign *= -1
        ans[0] += sign * a
    for i in range(1, N):
        ans[i] = A[i - 1] * 2 - ans[i - 1]
    print((" ".join(map(str, ans))))


if __name__ == "__main__":
    main()

+ +sys.setrecursionlimit(10**6) -    N = int(input()) +    N = int(eval(input())) -    for i, a in enumerate(A): -        ans[0] += (-1) ** i * a +    sign = -1 +    for a in A: +        sign *= -1 +        ans[0] += sign * a -    for a in ans: -        print(a, end=" ") -    print("") +    print((" ".join(map(str, ans))))