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