#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  vector<int> v(t);
  for (int i = 0; i < t; i++) cin >> v[i];
  long long mx = 0;
  for (int i = 0; i < t; i++) {
    cout << (long long)v[i] + mx << " ";
    mx = max(mx, v[i] + mx);
  }
  cout << endl;
  return 0;
}
