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



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

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

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto ni = input.front.split.to!( long[] );
	
	return tuple( ni[ 0 ], ni[ 1 ] );
}

auto solve( long n, long i )
{
	return n + 1 - i;
}
