#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long b[n];
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  long long x[n];
  long long a[n];
  long long first = b[0];
  a[0] = first;
  x[0] = 0;
  long long maxval = a[0];
  for (int i = 1; i < n; i++) {
    maxval = max(x[i - 1], maxval);
    x[i] = maxval;
    a[i] = b[i] + x[i];
    maxval = max(maxval, a[i]);
  }
  for (int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
