#include <bits/stdc++.h>
using namespace std;
void primerange(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int i = 2; i <= (int)sqrt(n); ++i) {
    if (prime[i]) {
      for (int j = i * i; j <= n; j += i) prime[j] = false;
    }
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> b(n);
  for (int i = 0; i < n; ++i) cin >> b[i];
  vector<long long int> a(n), x(n);
  long long int xmax = 0;
  for (int i = 0; i < n; ++i) {
    if (i != 0) {
      xmax = max(xmax, a[i - 1]);
      x[i] = xmax;
      a[i] = b[i] + x[i];
    } else {
      a[i] = b[i];
      x[i] = 0;
      xmax = 0;
    }
    cout << a[i] << " ";
  }
}
