#include <bits/stdc++.h>
using namespace std;
long long a[2000010], otv[2000010], mx = 0;
int main() {
  long long n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  otv[1] = a[1];
  mx = a[1];
  for (int i = 2; i <= n; i++) {
    otv[i] = a[i] + mx;
    mx = max(otv[i], mx);
  }
  for (int i = 1; i <= n; i++) {
    cout << otv[i] << " ";
  }
}
