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