func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
    
let ab = readInts()
let a = nab[0]
let b= nab[1]
if (a>k)&&(b>k){
  print("IMPOSSIBLE")
}else if(a<=k)&&(b<=k){
  print("IMPOSSIBLE")
}else{
  print(Int((a+b)/2))