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