#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int arr[N];
  int maxN = 0;
  for (int n = 0; n < N; n++) {
    cin >> arr[n];
    arr[n] += maxN;
    if (maxN < arr[n]) maxN = arr[n];
  }
  for (int n = 0; n < N; n++) cout << arr[n] << " ";
  return 0;
}
