#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> v, a;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    v.push_back(x);
  }
  reverse(v.begin(), v.end());
  a.push_back(v[0]);
  a.push_back(v[1] + a[0]);
  long long int c = a[1] - a[0];
  for (long long int i = 2; i < v.size(); i++) {
    a.push_back(v[i] + c);
    c *= -1;
    c += a[i];
  }
  for (long long int i = n - 1; i >= 0; i--) cout << a[i] << " ";
  return 0;
}
