import java.util.*

fun main(vararg args: String) {
    val scanner = Scanner(System.`in`)
    val a = scanner.nextInt()
    val b = scanner.nextInt()
    val diff = Math.abs(a - b)
    if (diff % 2 == 1) {
        println("IMPOSSIBLE")
        return
    }
    val k = Math.min(a, b) + diff / 2
    println(k)
}
