#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  long long int j, y, h, i, d, x, n, k, l, m, p;
  cin >> n;
  int a[n], b[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  b[0] = a[0];
  h = b[0];
  cout << b[0] << " ";
  for (i = 1; i < n; i++) {
    k = a[i] + h;
    cout << k << " ";
    if (k > h) {
      h = k;
    }
  }
}
