#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int arr[N];
int ans[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  ans[0] = arr[0];
  int maxi = arr[0];
  for (int i = 1; i < n; ++i) {
    ans[i] = arr[i] + maxi;
    maxi = max(maxi, ans[i]);
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
  return 0;
}
