#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> b;
  vector<long long> x;
  for (long long i = 0; i < n; i++) {
    long long k;
    cin >> k;
    b.push_back(k);
  }
  long long c = 0;
  x.push_back(0);
  for (long long i = 1; i < n; i++) {
    long long bal = c + b[i - 1];
    if (bal > c)
      x.push_back(bal);
    else
      x.push_back(c);
    c = x[i];
  }
  for (long long i = 0; i < n; i++) {
    cout << x[i] + b[i] << " ";
  }
}
