#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
pair<long long int, long long int> s4[4] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
pair<long long int, long long int> s8[8] = {
    {-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}};
void judge() {}
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int x = 0;
  for (int i = 0; i < n; i++) {
    a[i] += x;
    x = max(x, a[i]);
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
}
signed main() {
  judge();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  solve();
}
