#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<set>
#include<stack>
#include<queue>
#include<map>
#include<vector>
#define maxn 100505
#define ll long long
#define mod 1000000007
using namespace std;
int n,m,k,t;
int a[maxn],b[maxn];
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
        if(i&1)b[1]+=a[i];
        else b[1]-=a[i];
    }
    for(int i=2;i<=n;i++)
        b[i]=2*a[i-1]-b[i-1];
    for(int i=1;i<n;i++)
        printf("%d ",b[i]);
    printf("%d\n",b[n]);
}