"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = parseInt(arg[0].split(" ")[0]);
    const B = parseInt(arg[0].split(" ")[1]);
    
    const abs = Math.abs(A - B);
    
    if(abs % 2 !== 0) {
        console.log("IMPOSSIBLE");
        return;
    }
    
    let answer = (abs / 2) + Math.min(A, B) 
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));