import           Control.Applicative()

main :: IO ()
main = do
    [a, b] <- map (read :: String -> Int) . words <$> getLine
    putStrLn $ if ((a + b) `mod` 2) == 0
        then show (abs (a - b) `div` 2 + min a b)
        else "IMPOSSIBLE"

