#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int main() {
  long long i, j, k;
  long long n, t;
  cin >> n;
  long long b[n + 1], a[n + 1], x[n + 1];
  for (i = 1; i <= n; ++i) {
    cin >> b[i];
  }
  a[1] = b[1];
  x[1] = 0;
  cout << a[1] << " ";
  for (i = 2; i <= n; ++i) {
    x[i] = max(x[i - 1], a[i - 1]);
    a[i] = b[i] + x[i];
    cout << a[i] << " ";
  }
  return 0;
}
