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