#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vector<int> b(n);
  b[n - 1] = a[n - 1];
  long long sum1 = b[n - 1], sum2 = -b[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    if ((n - i) % 2 == 0) {
      b[i] = a[i] - sum2;
      sum2 += b[i];
      sum1 -= b[i];
    } else {
      b[i] = a[i] - sum1;
      sum1 += b[i];
      sum2 -= b[i];
    }
  }
  for (auto elem : b) cout << elem << " ";
  cout << endl;
  return 0;
}
