#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int B[n], A[n];
  int max = 0;
  for (int i = 0; i < n; i++) {
    cin >> B[i];
    A[i] = B[i] + max;
    cout << A[i] << " ";
    if (max < A[i]) max = A[i];
  }
}
