#include <bits/stdc++.h>
using namespace std;
long long t, n, b[200001];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> b[i];
  long long maxx = b[1];
  cout << maxx << " ";
  for (int i = 2; i <= n; i++) {
    cout << b[i] + maxx << " ";
    maxx = max(b[i] + maxx, maxx);
  }
}
