#include <bits/stdc++.h>
using namespace std;
int dp[13][111];
long long a[100009];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  long long sum = 0;
  vector<long long> res;
  for (int i = n; i > 0; --i) {
    long long ans = sum + a[i];
    res.push_back(ans);
    sum *= -1;
    sum += ans;
  }
  reverse(res.begin(), res.end());
  for (auto v : res) cout << v << " ";
  cout << endl;
}
