#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<long long> ans;
  ans.push_back(v[0]);
  long long xi = 0;
  for (int i = 1; i < v.size(); i++) {
    xi = max(xi, ans[i - 1]);
    ans.push_back(v[i] + xi);
  }
  for (auto u : ans) {
    cout << u << " ";
  }
}
