#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int b[n];
  for (int i = 0; i < n; i++) cin >> b[i];
  int ans[n];
  int max = 0;
  ans[0] = b[0];
  cout << ans[0] << " ";
  for (int i = 1; i < n; i++) {
    if (ans[i - 1] > max) max = ans[i - 1];
    ans[i] = b[i] + max;
    cout << ans[i] << " ";
  }
  cout << "\n";
}
