#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, c = 0, d = 0;
  cin >> n;
  long long int arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  c = arr[0];
  cout << c << " ";
  for (i = 1; i < n; i++) {
    cout << c + arr[i] << " ";
    if (c + arr[i] > c) {
      c += arr[i];
    }
  }
  cout << endl;
  return 0;
}
