#include <bits/stdc++.h>
using namespace std;
void code() {
  int n;
  cin >> n;
  int ans = 0;
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int prev = 0, m = 0;
  for (int i = 0; i < n; i++) {
    cout << m + A[i] << ' ';
    m = max(m, m + A[i]);
  }
  cout << '\n';
}
signed main() {
  std::ios_base::sync_with_stdio(false);
  int t = 1;
  for (int i = 0; i < t; i++) {
    code();
  }
}
