#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
const unsigned int M = 1000000007;
vector<int> graph[200005];
int degree[105];
int a[200005];
int main() {
  int n;
  cin >> n;
  int a[n];
  vector<int> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int x = 0;
  for (int i = 0; i < n; i++) {
    vec[i] = x + a[i];
    cout << vec[i] << " ";
    x = max(x, vec[i]);
  }
  cout << "\n";
  return 0;
}
