#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a, b(n);
  int x = 0;
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    a.push_back(b[i] + x);
    x = max(x, a[i]);
  }
  for (auto& x : a) cout << x << " ";
  cout << "\n";
  return 0;
}
