#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1e16;
const long long ninf = LLONG_MIN;
const long double eps = 1e-12;
const long long N = 1000005;
const long long LOGN = 19;
const long double PI = 3.14159265358979323846;
long long mul(long long a, long long b) { return (a * b) % mod; }
long long add(long long a, long long b) {
  a += b;
  if (a >= mod) a -= mod;
  if (a < 0) a += mod;
  return a;
}
long long a[N], b[N], n;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long tmp = a[n - 1];
  b[n - 1] = a[n - 1];
  long long k = 0;
  for (long long i = n - 2; i >= 0; i--) {
    b[i] = a[i] + tmp;
    tmp *= -1;
    tmp += b[i];
  }
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  cout << "\n";
  return 0;
}
