import Data.Bits
import Data.List
import Control.Monad
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as VM
import Control.Monad.ST
import Data.Maybe (fromMaybe)
import qualified Data.ByteString.Lazy.Char8 as B

main :: IO ()
main = do
  --s <- readLn :: IO Int
  [a',b'] <- map read.words <$> getLine :: IO [Int]
  let a = min a' b'
      b = max a' b'
  if even $ b - a then print $ a + ((b-a) `div` 2)
    else putStrLn $ "IMPOSSIBLE"
