fun main(args: Array<String>) {
val read = readLine()!!.reader().readText().split(" ")
    val a = read[0].toInt()
    val b = read[1].toInt()
    val max = if (a < b) b else a

    if (a != b) {
        repeat(max) {
            val x = Math.abs(a - it)
            val y = Math.abs(b - it)
            if (x == y) {
                println(it)
                return
            }
        }
        println("IMPOSSIBLE")
    } else {
        println("IMPOSSIBLE")
    }
}