#include <bits/stdc++.h>
using namespace std;
int main() {
  int c, d, e, n, f, x = 0, y, z, cnt = 0, res = 0, mx = 1;
  int sum = 0;
  bool ash = false;
  string s;
  cin >> n;
  int a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int maxi = 0;
  for (int i = 0; i < n; i++) {
    sum = a[i];
    sum = sum + maxi;
    b[i] = sum;
    maxi = max(maxi, sum);
  }
  for (int i = 0; i < n; i++) {
    cout << b[i] << " ";
  }
  return 0;
}
