#include <bits/stdc++.h>
const int maxn = 2e5 + 10;
const int maxm = 1.5e7 + 10;
const int mod = 998244353;
using namespace std;
int n;
int a[maxn], b[maxn];
int main() {
  {
    scanf("%d", &n);
    int mx = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &b[i]);
      a[i] = b[i] + mx;
      mx = max(mx, a[i]);
    }
    for (int i = 0; i < n; i++) printf("%d ", a[i]);
    printf("\n");
  }
  return 0;
}
