#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 177;
int b[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &b[i]);
  }
  cout << b[0] << " ";
  int now = max(b[0], 0);
  for (int i = 1; i < n; i++) {
    cout << b[i] + now << " ";
    now = max(now, b[i] + now);
  }
  cout << endl;
}
