#include <bits/stdc++.h>
using namespace std;
bool sortmd(pair<long long, long long> &a, pair<long long, long long> &b) {
  if (a.first != b.first)
    return a.first < b.first;
  else
    return a.second < b.second;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long n, i, j, k, m = 0;
  cin >> n;
  long long b[n];
  for (i = 0; i < n; i++) cin >> b[i];
  j = 0;
  for (i = 0; i < n; i++) {
    k = b[i] + m;
    m = max(m, k);
    cout << k << " ";
  }
  return 0;
}
