#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  long long int value = 0;
  long long int str[n];
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      str[i] = arr[i];
      value = str[i];
    } else {
      str[i] = arr[i] + value;
      if (value < str[i]) value = str[i];
    }
  }
  for (int i = 0; i < n; i++) cout << str[i] << " ";
}
