#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cerr.tie(nullptr);
  long long n;
  cin >> n;
  long long b[n + 2];
  for (long long i = 1; i <= n; ++i) {
    cin >> b[i];
  }
  long long a[n + 2];
  a[1] = b[1];
  long long m = a[1];
  for (long long i = 2; i <= n; ++i) {
    a[i] = b[i] + m;
    m = max(m, a[i]);
  }
  for (long long i = 1; i <= n; ++i) cout << a[i] << ' ';
  cout << '\n';
}
