fun main(args: Array<String>) {
//    val mod = 1000000007L
    val mod = 2019
//    val N = readLine()!!.toInt()
    val (A,B) = readLine()!!.split(" ").map(String::toLong)
    var ans = "IMPOSSIBLE"

    for (k in 0..Math.max(A,B)) {
        if (Math.abs(A-k) != Math.abs(B-k)) continue
        ans = "$k"
        break
    }
    println(ans)
}