fun main(args:Array<String>){
    val (a,b) = readLine()!!.split(" ").map{it.toInt()}
    val ma = Math.max(a,b)
    val mi = Math.min(a,b)
    println(if(a % 2 == b % 2) mi + (ma - mi) / 2 else "IMPOSSIBLE")
}