#include <bits/stdc++.h>
using namespace std;
const long long Nmax = 2e5 + 5;
long long a[Nmax];
long long ans[Nmax];
long long n;
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  ans[1] = a[1];
  long long maxx = 0;
  for (long long i = 2; i <= n; i++) {
    maxx = max(maxx, ans[i - 1]);
    ans[i] = a[i] + maxx;
  }
  for (long long i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
