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