#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long int INF = 1e18;
const long double PI =
    3.141592653589793238462643383279502884197169399375105820974944;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  ;
  vector<long long int> b(n, 0);
  for (auto i = 0; i < n; i++) cin >> b[i];
  ;
  vector<long long int> a(n, -1);
  a[0] = b[0];
  a[1] = b[1] + b[0];
  long long int x = a[0];
  for (auto i = 2; i < n; i++) {
    x = max(x, a[i - 1]);
    a[i] = b[i] + x;
  }
  for (auto it = a.begin(); it != a.end(); ++it) cout << *it << ' ';
  cout << endl;
  ;
  return 0;
}
