object Main {


  def main(args: Array[String]): Unit = {
    val inputs = io.StdIn.readLine.split(" ").map(_.toInt)
    val a = inputs(0)
    val b = inputs(1)

    def solve(a: Int, b: Int): Either[String, Int] = {
      val twiceAns = a + b
      if (twiceAns % 2 == 0) Right(twiceAns / 2)
      else Left("IMPOSSIBLE")
    }

    solve(a, b) match {
      case Right(i) => println(i)
      case Left(s) => println(s)
    }

  }

}
