#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> m;
    cout << (m + mx) << " ";
    mx = max(m + mx, mx);
  }
  cout << endl;
}
