unittest
{
	assert( [ "6" ].parse.expand.solve == 3 );
	assert( [ "2" ].parse.expand.solve == 2 );
	assert( [ "11" ].parse.expand.solve == 5 );
}



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 ) )
{
	auto x = input.front.to!( long );
	return tuple( x );
}

auto solve( long x )
{
	auto t = 0L;
	for( auto d = 0L; d < x; d += t )
	{
		t++;
	}
	return t;
}
