#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t first) {
    first += 0x9e3779b97f4a7c15;
    first = (first ^ (first >> 30)) * 0xbf58476d1ce4e5b9;
    first = (first ^ (first >> 27)) * 0x94d049bb133111eb;
    return first ^ (first >> 31);
  }
  size_t operator()(uint64_t first) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(first + FIXED_RANDOM);
  }
};
const int MOD = 1e9 + 7;
const long long INF = 1e18;
const int inf = 1e9;
const int MX = 1e5 + 1;
long long nx() {
  long long first;
  cin >> first;
  return first;
}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n = nx();
  vector<int> b(n);
  for (int i = 0; i < (n); ++i) cin >> b[i];
  int val = b[0];
  cout << val << ' ';
  int mx = val;
  for (int i = 0; i < (n - 1); ++i) {
    val = mx + b[i + 1];
    mx = max(mx, val);
    cout << val << ' ';
  }
  return 0;
}
