#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N], b[N];
int main() {
  int n, m, i, j, k, t = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
  }
  a[1] = b[1];
  int pos = a[1];
  for (i = 2; i <= n; i++) {
    a[i] = b[i] + pos;
    pos = max(pos, a[i]);
  }
  for (i = 1; i <= n; i++) {
    printf("%d ", a[i]);
  }
  return 0;
}
