#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  vector<long long> b(n);
  vector<long long> a(n);
  long long maxim;
  for (long long i = 0; i < n; i++) {
    cin >> b[i];
  }
  a[0] = maxim = b[0];
  for (long long i = 1; i < n; i++) {
    a[i] = b[i] + maxim;
    if (a[i] > maxim) maxim = a[i];
  }
  for (long long i = 0; i < n; i++) cout << a[i] << ' ';
  cout << endl;
}
