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