#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define M 100001
ll n,A[M],res,H[M];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++)cin>>A[i];
	for(int i=2;i<=n;i+=2)res+=A[i]-A[i-1];
	H[1]=A[n]-res;
	for(int i=3;i<=n;i+=2)H[i]=H[i-2]+(A[i-1]-A[i-2])*2;
	for(int i=2;i<=n;i+=2)H[i]=A[i-1]*2-H[i-1];
	for(int i=1;i<=n;i++)printf("%lld ",H[i]);
	return 0;
}