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