var input = require('fs').readFileSync('/dev/stdin', 'utf8'),
    nums = input.split(/\s+/),
    a = nums[0],
    b = nums[1];

// a >= 0
// b <= 10^9
// a /= b

var diff = Math.abs(a - b);

for (var i = a; i <= diff; ++i) {
  	var aSubPrev = 0,
        bSubPrev = 0,
    	aSub = a -i,
        bSub = b -i;
  	
  	if ((aSub * bSub) > 0 && (aSubPrev * bSubPrev) < 0)
      	break;

	if (Math.abs(a - i) === Math.abs(b - i)) {
    	console.log(i);
      	return;
    }
  	aSubPrev = aSub;
	bSubPrev = bSub;
}
console.log("IMPOSSIBLE");