main = do
  li <- getLine
  let [a,b] = map read $ words li
  let ans = compute a b
  case ans of
    Nothing -> putStrLn "IMPOSSIBLE"
    Just x -> print x

compute :: Int -> Int -> Maybe Int
compute a b
  | even d = Just m
  | True = Nothing
  where
    d = abs (a - b)
    m = (a + b) `div` 2