import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List
import Data.Maybe

justMean :: Int -> Int -> Maybe Int
justMean a b
  | even d = Just $ a + div d 2
  | otherwise = Nothing
  where d = b - a

main = (\[a,b] -> justMean a b) . map read . words <$> getLine >>= putStrLn . maybe "IMPOSSIBLE" show 