#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n;
  cin >> n;
  long long int m = 0, x;
  vector<long long int> v(n);
  vector<long long int> ans(n);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
    if (i != 0) m = max(m, ans[i - 1]);
    if (i == 0)
      ans[i] = v[i];
    else
      ans[i] = v[i] + m;
  }
  for (long long int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
