#include <bits/stdc++.h>
using namespace std;
int a[100005];
int b[100005];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    for (int i = 0; i < n; i++) {
      scanf("%d", a + i);
    }
    b[n - 1] = a[n - 1];
    b[n - 2] = a[n - 2] + b[n - 1];
    for (int i = n - 3; i >= 0; i--) b[i] = a[i] + b[i + 1] - a[i + 2];
    for (int i = 0; i < n; i++) printf("%d ", b[i]);
    printf("\n");
  }
  return 0;
}
