import qualified Data.ByteString.Char8 as BS
import Data.Maybe

readInt = fst . fromJust . BS.readInt

readIntList = map readInt . BS.words

getIntList = readIntList <$> BS.getLine

main = do
  [a, b] <- getIntList
  let diff = a - b
  if odd diff
    then putStrLn "IMPOSSIBLE"
    else print $ b + diff `div` 2
