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