#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:134217728")
using namespace std;
const int Nmax = 1e5 + 17;
const int mod = 1e9 + 7;
long long a[Nmax];
long long b[Nmax];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  b[n - 1] = a[n - 1];
  long long sum = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    b[i] = a[i] + sum;
    sum = b[i] - sum;
  }
  for (int i = 0; i < n; i++) cout << b[i] << " ";
}
