#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  vector<int> w(n);
  int ele = 0;
  for (int i = 0; i < n; i++) {
    w[i] = v[i] + ele;
    ele = max(w[i], ele);
  }
  for (int i = 0; i < n; i++) {
    cout << w[i] << " ";
  }
  cout << endl;
}
