#include<iostream>
using namespace std;
int main(){
int n;
cin >> n;
int shop[n];
for(int i = 0; i < n; i++){
cin >> shop[i];
}
cout << (shop[0] + shop[1]) / 2 << " ";
for(int i = 1; i < n - 1; i++){
cout << (shop[i - 1] + shop[i] + shop[i + 1]) / 3 << " ";
}
cout << (shop[n - 2] + shop[n - 1]) / 2 << endl;
return 0;
}