object Main extends App {
  var a = readLine.split(" ").map(_.toInt)
  var b = 0
  var sum = 0
  for(i <- 0 to a.max) {
    if(Math.abs(a(0)-i) == Math.abs(a(1)-i)) {
      b = 1
      sum = i
    }
  }
  print(if(b != 1) {"IMPOSSIBLE"} else {sum})
}