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