#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *arr = new int[2];
  cin >> arr[0] >> arr[1];
  for (int i = 0; i < n - 2; i++) {
    cout << arr[0] + arr[1] << " ";
    arr[0] = arr[1];
    cin >> arr[1];
  }
  cout << arr[0] + arr[1] << " " << arr[1];
  return 0;
}
