#include<bits/stdc++.h>
using namespace std;
using ll=long long;

int main(){
  int i,j;ll cnt=0;
  int n;
  cin>>n;
  int a[n];
  for(i=0;i<n;i++)cin>>a[i];
  for(i=0;i<n;i++){
    if(i%2==0)cnt+=a[i];
    else cnt-=a[i];
  }
  cout<<cnt;
  for(i=0;i<n-1;i++){
    cnt=(-1)*cnt+2*a[i];
    cout<<" "<<cnt;
  }
  cout<<endl;
}