import scala.io.StdIn
object Main extends App {
  val List(a,b) = StdIn.readLine().split(" ").map(_.toInt).toList
  val answer = for (k <- 1 to a.max(b) if ((a-k).abs == (b-k).abs)) yield k
  println(if (answer.isEmpty) "IMPOSSIBLE" else answer(0))
}
