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