unittest
{
	assert( [ "2", "3 4" ].parse.expand.solve == "3.50000" );
	assert( [ "3", "500 300 200" ].parse.expand.solve == "375.00000" );
	assert( [ "5", "138 138 138 138 138" ].parse.expand.solve == "138.00000" );
}



import std.conv;
import std.container;
import std.format;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	input.popFront;
	auto vs = input.front.split.to!( double[] );
	return tuple( vs );
}

auto solve( double[] vs )
{
	auto queue = heapify!( ( a, b ) => b < a )( vs );
	while( 2 <= queue.length )
	{
		auto a = queue.front;
		queue.popFront;
		auto b = queue.front;
		queue.popFront;
		queue.insert( ( a + b ) / 2 );
	}
	return format( "%0.5f", queue.front );
}
