#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long mx = 0;
  long long n;
  cin >> n;
  while (n--) {
    long long x;
    cin >> x;
    long long y = x + mx;
    mx = max(mx, y);
    cout << y << " ";
  }
  return 0;
}
