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