#include <iostream>
using namespace std;
int main() {
int tab[101];
int i = 0;
do {
cin >> tab[i];
i++;
}while(tab[i-1]!=-1);
i--;
if(i%2!=0) {
cout << tab[i/2];
}
else if(i%2==0) {
cout << (tab[i/2-1] + tab[i/2]) / 2.0;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCWludCB0YWJbMTAxXTsKCWludCBpID0gMDsKCWRvIHsKCQljaW4gPj4gdGFiW2ldOwoJCWkrKzsKCX13aGlsZSh0YWJbaS0xXSE9LTEpOwoJaS0tOwoJaWYoaSUyIT0wKSB7CgkJY291dCA8PCB0YWJbaS8yXTsKCX0KCWVsc2UgaWYoaSUyPT0wKSB7CgkJY291dCA8PCAodGFiW2kvMi0xXSArIHRhYltpLzJdKSAvIDIuMDsKCX0KCXJldHVybiAwOwp9