"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const args= arg_str.split(' ')
const arg_1 = parseInt(args[0])
const arg_2 = parseInt(args[1])

const sum = arg_1 + arg_2
const div = Math.floor(sum / 2)
const mod = sum % 2

const IMPOSSIBLE = "IMPOSSIBLE"

if(mod != 0){
  console.log(IMPOSSIBLE)
  return
}
if(arg_1 == arg_2){
  console.log(IMPOSSIBLE)
  return
}

let return_val1 = 0
if(arg_1 < div){
  return_val1 = div - arg_1
}else{
  return_val1 = arg_1 - div
}

let return_val2 = 0
if(arg_2 < div){
  return_val2 = div - arg_2
}else{
  return_val2 = arg_2 - div
}

if(return_val1 == return_val2){
  console.log(`${return_val1}`)
}else{
  console.log(IMPOSSIBLE)
}

