import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val A, B = Integer.parseInt(sc.next())

    if ((A - B) % 2 != 0) {
      println("IMPOSSIBLE")
    } else {
      println(Math.min(A, B) + Math.abs(A - B) / 2)
    }
  }
}