#include <bits/stdc++.h>
using namespace std;
const long long siz = 2e5 + 10;
const long long SIZ = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long maxx = 2e9;
const long long MAXX = 1e18;
long long t, n;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  long long x = 0;
  for (long long i = 1; i <= n; i++) {
    long long b;
    cin >> b;
    b += x;
    x = max(x, b);
    cout << b << " ";
  }
  cout << "\n";
  return 0;
}
