#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, max1 = 0;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; ++i) {
    long long int t;
    cin >> t;
    a[i] = t + max1;
    if (a[i] > max1) max1 = a[i];
  }
  for (long long int i = 0; i < n; ++i) cout << a[i] << " ";
}
