unittest
{
	assert( [ "2 16" ].parse.expand.solve == "9" );
	assert( [ "0 3" ].parse.expand.solve == "IMPOSSIBLE" );
	assert( [ "998244353 99824435" ].parse.expand.solve == "549034394" );
}



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 ab = input.front.split.to!( long[] );
	return tuple( ab[ 0 ], ab[ 1 ] );
}

auto solve( long a, long b )
{
	auto kk = a + b;
	if( kk % 2 == 1 ) return "IMPOSSIBLE";
	else              return ( kk / 2 ).to!string;
}
