object Main {
  def main(args:Array[String]) {
    val AB = readLine().split(' ').map(_.toInt)
    val A = AB(0)
    val B = AB(1)
    var K = 0

    var flag = true
    while(flag) {
      if(math.abs(A - K) == math.abs(B - K)) {
        flag = false
        println(K)
      }
      if(A < K && B < K) {
        flag = false
        println("IMPOSSIBLE")
      }
      K += 1
    }
  }
}
