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