#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> b(n);
  for (auto& x : b) {
    cin >> x;
  }
  vector<long long> a(n);
  a[0] = b[0];
  long long mx = a[0];
  for (int i = 1; i < n; i++) {
    a[i] = b[i] + mx;
    mx = max(mx, a[i]);
  }
  for (int i = 0; i < n; i++) {
    cout << a[i];
    if (i + 1 < n) {
      cout << " ";
    }
  }
  cout << "\n";
}
