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