'use strict';
 
process.stdin.resume();
process.stdin.setEncoding('utf-8');
 
let inputString = '';
let currentLine = 0;
 
process.stdin.on('data', function(inputStdin) {
    inputString += inputStdin;
});
 
process.stdin.on('end', function() {
    inputString = inputString.split('\n');
    main();
});
 
function readline() {
    return inputString[currentLine++];
}
 
 
// main function .... code start ... ///
function main() {
 
 var k = readline().split('').map(x => parseInt(x));
var a = k[0], b = k[1];

if (a % 2 == b % 2) {
    console.log(a + b) / 2;
} else {
    console.log("IMPOSSIBLE");
}

}