#include <bits/stdc++.h>
using namespace std;
void start() {}
void sober() {
  long int n;
  cin >> n;
  long int* a = new long int[n];
  for (long int i = 0; i < n; i++) cin >> a[i];
  vector<long int> v;
  long int cur = a[0];
  v.push_back(a[0]);
  for (int i = 1; i < n; i++) {
    v.push_back(a[i] + cur);
    if (a[i] + cur > cur) cur += a[i];
  }
  for (auto i : v) cout << i << " ";
  return;
}
signed main() {
  start();
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long int t = 1;
  while (t--) {
    sober();
  }
}
