#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  long long int n;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cout << a[0] << " ";
  long long int max = a[0];
  for (int i = 1; i < n; i++) {
    if (a[i - 1] >= max) {
      a[i] = a[i - 1] + a[i];
      max = a[i - 1];
    } else {
      a[i] = max + a[i];
    }
    cout << a[i] << " ";
  }
  return 0;
}
