#include <bits/stdc++.h>
using namespace std;
int n;
int b[200005];
int a[200005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> b[i];
  a[1] = b[1];
  int maks = a[1];
  for (int i = 2; i <= n; i++) {
    a[i] = b[i] + maks;
    maks = max(maks, a[i]);
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
