func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let ab=readInts()
let a=ab[0]
let b=ab[1]

if a==b{
  print(a)
}else if (a+b)%2==0{
  print((a+b)/2)
}else{
  print("IMPOSSIBLE")
}