#include <bits/stdc++.h>
int main() {
  int n, x = 0;
  scanf("%d", &n);
  int b[n], a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &b[i]);
  }
  for (int i = 0; i < n; i++) {
    a[i] = b[i] + x;
    printf("%d ", a[i]);
    if (a[i] > x) {
      x = a[i];
    }
  }
  return 0;
}
