#include <bits/stdc++.h>
using namespace std;
void init() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  init();
  int n;
  cin >> n;
  vector<int> b(n);
  for (auto &ev : b) cin >> ev;
  vector<int> a;
  a.push_back(b[0]);
  int curmax = max(0, a[0]);
  for (int i = 1; i < n; i++) {
    a.push_back(b[i] + curmax);
    curmax = max(curmax, a[i]);
  }
  for (auto ev : a) cout << ev << " ";
  return 0;
}
