#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e9 + 7, INF = 2e18;
ld st;
const int mod = 1e9 + 7, inf = 2e9;
int tests = 1;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll rnd(ll x = 0, ll y = INF) { return (rng() % (y - x + 1)) + x; };
void preprocess();
void run_test();
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cout << fixed << setprecision(10);
  preprocess();
  for (int i = 1; i <= tests; ++i) {
    if (!1) cerr << "\nWhile solving TC " << i << ":\n", st = clock();
    run_test();
    if (!1)
      cerr << "\nTC " << i
           << " done in:: " << 1000 * (clock() - st) / CLOCKS_PER_SEC
           << " ms\n";
  }
  if (!1)
    cerr << "\nGG in: " << 1000 * ((ld)clock()) / CLOCKS_PER_SEC << " ms\n";
  return 0;
}
void preprocess() {}
const int N = 2e5 + 1;
int n;
int A[N];
void run_test() {
  cin >> n;
  ll stn = 0;
  for (int i = 0; i < n; ++i) {
    cin >> A[i];
    cout << stn + A[i] << " ";
    if (A[i] > 0) {
      stn += A[i];
    }
  }
  cout << endl;
};
