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