#include <bits/stdc++.h>
using namespace std;
long long n, m, x;
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    x += m;
    cout << x << " ";
    m = max(m, x);
  }
}
