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