solve :: Int -> Int -> String
solve a b
  | a `mod` 2 /= b `mod` 2 = "IMPOSSIBLE"
  | otherwise = show $ (a + b) `div` 2

main :: IO ()
main = do
  [a, b] <- map read . words <$> getLine
  putStrLn $ solve a b