#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], res[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int ult = a[n - 1];
  res[n - 1] = ult;
  int acum = 0;
  for (int i = n - 2; i >= 0; i--) {
    acum = ult - acum;
    res[i] = a[i] + acum;
    ult = res[i];
  }
  for (int i = 0; i < n; i++) cout << res[i] << ' ';
  cout << endl;
}
