#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int maxi = 0;
  for (int i = 0; i < n; ++i) {
    int b;
    cin >> b;
    b += maxi;
    cout << b << ' ';
    maxi = max(maxi, b);
  }
  cout << '\n';
}
