function main(a, b) {
  	if(a === 0 || b === 0){ return a === 0 ? b : a; }
    const max = a > b ? a : b;
  	const min = a > b ? b : a;
  	let i = Math.floor((max - min)/2);
  	while(i > 0 && i < max){
      const maxMinus = Math.abs(max - i);
      const minMminus = Math.abs(min - i);
      if(maxMinus === minMinus){
        return i;
      }else if(maxMinus > minMinus){
        i++;
      }else{
        i--;
      }
    }
  return 'IMPOSSIBLE';
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));