fun main(args: Array<String>){
    val AB = listOfInt().sorted()
    val A = AB.min() ?: 0
    val B = AB.max() ?: 0
    val K = (B - A) / 2
    if (K + K == B - A)
        println(A + K)
    else
        println("IMPOSSIBLE")
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { it.toLong() }
