#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  int max_x = 0;
  std::vector<int> v(n, 0);
  for (int i = 0; i < n; ++i) {
    std::cin >> v[i];
  }
  for (const auto& elem : v) {
    int tmp = elem + max_x;
    if (tmp > max_x) max_x = tmp;
    std::cout << tmp << ' ';
  }
  return 0;
}
