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