#include <iostream>
#include <cstdio>
using namespace std;

const int N = 1e5+5;
int n, a[N], b[N];

int main()
{
    //freopen("a.inp","r",stdin);
    scanf("%d",&n);
    for(int i=1; i<=n; ++i) scanf("%d",a+i);
    for(int i=1; i<=n; ++i) b[1] += i&1 ? +a[i] : -a[i];
    for(int i=1; i<n; ++i) b[i+1] = a[i]+a[i] - b[i];
    for(int i=1; i<=n; ++i) printf("%d ",b[i]);
}
