#include <bits/stdc++.h>
using namespace std;
long long t, n, m, k, ccnt, pos = 0, sum = 0, minn2 = INT_MAX, sum2, cnt = 0,
                            cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0, cnt5 = 0,
                            cnt6 = 0, cnt7 = 0, a[1000005], x1, y7, x2, y2, x3,
                            y3, aaa, bbb;
long long vis[1000005], b[1000005], c[1000005], c3[105][105], c4[1000005],
    kk[1000005], x, y, z, d = 0, minn = LONG_LONG_MAX, maxx = -LONG_LONG_MAX;
long long pos1 = 0, pos2 = 0, tem, tem2, l, r, ans = 0, ans2, mod = 1000000007,
          tw[100005], th[100005], dd, ee, out[1000005], dp[205][407],
          te[100005];
string s1, s2, s;
char cc[1005][1005], ch, cr[100005], ch2;
double min1;
map<string, long long> m1;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  maxx = 0;
  for (int i = 0; i < n; i++) {
    cout << maxx + a[i] << " ";
    if (a[i] > 0) {
      maxx = maxx + a[i];
    }
  }
}
