#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const ll mod = 1000000007;
const ll M = 1000000000000000000ll;
inline ll add(ll a, ll b) { return ((a % mod + b % mod) % mod); }
inline ll sub(ll a, ll b) { return ((a % mod - b % mod + mod) % mod); }
inline ll mult(ll a, ll b) { return (((a % mod) * (b % mod)) % mod); }
inline ll power(ll n, ll x) {
  ll p = 1;
  while (x != 0) {
    if (x % 2 == 0) {
      n = mult(n, n);
      x = x / 2;
    }
    p = mult(p, n);
    x--;
  }
  return p;
}
inline ll recurmult(ll a, ll b) {
  ll r = 0;
  while (b) {
    if (b & 1) r = add(r, a);
    a = mult(2, a);
    b >>= 1;
  }
  return r % mod;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ll n, ma = 0;
  cin >> n;
  ll arr[n + 1];
  ll ans[n + 1];
  for (ll i = 0; i < n; i++) cin >> arr[i];
  ans[0] = arr[0];
  ma = ans[0];
  for (ll i = 1; i < n; i++) {
    ans[i] = ma + arr[i];
    ma = max(ma, ans[i]);
  }
  for (ll i = 0; i < n; i++) cout << ans[i] << " ";
}
