#include <bits/stdc++.h>
using namespace std;
void toh_chaliye_shuru_karte_hain() {}
void code_samapti_ki_ghoshna() {}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int n;
  cin >> n;
  long long int a[n];
  long long int i, x = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    a[i] = a[i] + x;
    x = max(x, a[i]);
  }
  for (i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
  return 0;
}
