#include <iostream>
using namespace std;
int main() {
int input[200000], i, tmp, count = 0;
while ( cin >> tmp ) {
for ( i = count - 1; i >= 0 && input[i] > tmp; i-- )
input[i + 1] = input[i];
input[i + 1] = tmp;
count++;
cout << ( ( count % 2 ) ? ( input[count / 2] ) : ( input[count / 2 - 1] + input[count / 2] ) / 2 ) << endl;
}
}