import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val a = scanner.nextDouble()
    val b = scanner.nextDouble()
    val min = Math.min(a,b).toInt()
    if(Math.abs((a-b)/2) === Math.abs((a-b)/2).toInt().toDouble()) println(Math.abs((a-b)/2).toInt()+min)
    else println("IMPOSSIBLE")
}