#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, x, y;
  cin >> n;
  n--;
  cin >> y;
  cout << y;
  while (n--) {
    cin >> x;
    cout << " " << x + y;
    if (x >= 0) y = x + y;
  }
}
