#include <bits/stdc++.h>
using namespace std;
long long a[200000], b[200000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> b[i];
  a[0] = b[0];
  long long x = 0;
  for (int i = 1; i < n; i++) {
    x = max(x, a[i - 1]);
    a[i] = b[i] + x;
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
  return 0;
}
