#include <bits/stdc++.h>
using namespace std;
int ans[200005], b[200005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &b[i]);
  }
  int mx = 0;
  for (int i = 0; i < n; i++) {
    ans[i] = b[i] + mx;
    mx = max(mx, ans[i]);
    printf("%d ", ans[i]);
  }
}
