{-# LANGUAGE Strict #-}

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

solve :: Int -> Int -> Maybe Int
solve a b
  | q == 0    = Just p
  | otherwise = Nothing
  where (p, q) = divMod (a + b) 2
