#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long MAX = 2e6 + 7;
const long long dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const long long dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
long long i, j, k, t, n, q, l, r, mid;
long long a[MAX], b[MAX];
priority_queue<long long> pq;
void solve() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> b[i];
  pq.push(0);
  for (long long i = 0; i < n; i++) {
    a[i] = b[i] + pq.top();
    pq.push(a[i]);
    cout << a[i] << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  solve();
  return 0;
}
