#include <bits/stdc++.h>
using namespace std;
long long b[555555], x[555555], a[555555], k, l, n, m, o, p;
vector<long long> adj[555555];
map<long long, long long> mp;
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> b[i];
  a[0] = b[0];
  x[1] = a[0];
  for (long long i = 1; i < n; i++) {
    a[i] = b[i] + x[i];
    if (a[i] > x[i])
      x[i + 1] = a[i];
    else
      x[i + 1] = x[i];
  }
  for (long long i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
}
