unittest
{
	assert( [ "6", "9 1 4 4 6 7" ].parse.expand.solve == 2 );
	assert( [ "8", "9 1 14 5 5 4 4 14" ].parse.expand.solve == 0 );
	assert( [ "14", "99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 1" ].parse.expand.solve == 42685 );
}



import std.algorithm;
import std.conv;
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 ds = input.front.split.to!( long[] );
	return tuple( ds );
}

auto solve( long[] ds )
{
	ds.sort();
	return ds[ $ / 2 ] - ds[ $ / 2 - 1 ];
}
