fun main(args: Array<String>) {
    val (numA, numB) = readLine()!!.split(" ").map { it.toInt() }

    when((numA + numB) % 2){
        0 -> print(((numA + numB) / 2))
        else -> print("IMPOSSIBLE")
    }
}