#include <bits/stdc++.h>
using namespace std;
int main() {
  int size, i;
  cin >> size;
  long a[size], b[size], x[size], max;
  for (i = 0; i < size; i++) {
    cin >> b[i];
  }
  a[0] = b[0];
  x[0] = 0;
  max = a[0];
  for (int j = 1; j < size; j++) {
    if (a[j - 1] > max) max = a[j - 1];
    x[j] = max;
    a[j] = b[j] + x[j];
  }
  cout << "\n";
  for (i = 0; i < size; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
