import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
int n; // Инициализируем переменную n;
double a[]; // Инициализируем массив a;
Scanner sc
= new Scanner
(System.
in); n = sc.nextInt(); //Вводим размер массива;
a = new double[n];
for(int i = 0; i < n ; ++i){
a[i] = sc.nextInt(); //Вводим элементы массива;
}
if(n >= 3){
for(int i = 2; i < n; i+=3){
double tmp = a[i - 1];
a[i - 1] = (a[i] + a[i - 2])/2; //Находим полусумму двух предыдущих элементов;
a[i] = (tmp + a[i - 2])/2; //Заменяем число кратное трем на полусумму стоящих рядом элементов;
}
for(int i = 0; i < n ; ++i){
}
}
sc.close();
}
}
CmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwoKY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWludCBuOwkJCQkJCQkJCS8vINCY0L3QuNGG0LjQsNC70LjQt9C40YDRg9C10Lwg0L/QtdGA0LXQvNC10L3QvdGD0Y4gbjsKCQlkb3VibGUgYVtdOwkJCQkJCQkJLy8g0JjQvdC40YbQuNCw0LvQuNC30LjRgNGD0LXQvCDQvNCw0YHRgdC40LIgYTsKCQlTY2FubmVyIHNjID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQluID0gc2MubmV4dEludCgpOwkJCQkJCS8v0JLQstC+0LTQuNC8INGA0LDQt9C80LXRgCDQvNCw0YHRgdC40LLQsDsKCQlhID0gbmV3IGRvdWJsZVtuXTsJCQkJCQkKCQlmb3IoaW50IGkgPSAwOyBpIDwgbiA7ICsraSl7CgkJCWFbaV0gPSBzYy5uZXh0SW50KCk7CQkJCS8v0JLQstC+0LTQuNC8INGN0LvQtdC80LXQvdGC0Ysg0LzQsNGB0YHQuNCy0LA7CgkJfQoJCWlmKG4gPj0gMyl7Cg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