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