fun main(args: Array<String>) {
    val (A, B) = readLine()!!.split(" ").map { it.toLong() }
    val smaller = Math.min(A,B)
    val bigger = Math.max(A,B)
    for (i in smaller..bigger) {
        val smallEval = Math.abs(smaller - i)
        val biggerEval = Math.abs(bigger - i)
        if (smallEval == biggerEval) {
            println(i)
            return
        }
    }
    println("IMPOSSIBLE")
}
