unittest
{
	assert( [ "6 2" ].parse.expand.solve == 2 );
	assert( [ "14 3" ].parse.expand.solve == 2 );
	assert( [ "20 4" ].parse.expand.solve == 3 );
}



import std.conv;
import std.math;
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 ) )
{
	auto nd = input.front.split.to!( long[] );
	return tuple( nd[ 0 ], nd[ 1 ] );
}

auto solve( long n, long d )
{
	return cast( long )( n / ( d * 2.0L + 1 ) ).ceil;
}
