#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int s, n, b;
  while (cin >> n) {
    long long int sum = 0;
    vector<long long int> v;
    vector<long long int> a;
    v.clear();
    a.clear();
    for (int i = 0; i < n; i++) {
      cin >> s;
      v.push_back(s);
    }
    for (int j = 0; j < n; j++) {
      cout << sum + v[j] << " ";
      sum = max(sum, sum + v[j]);
    }
    cout << endl;
  }
}
