# A - Harmony
#
# 2分探索法

a, b = gets.split.map(&:to_i)


if a<b
  tmp = a
  a = b
  b = tmp
end



def binary_search(a, b)

  head = b
  tail = a

  while head <= tail

    center = (head + tail) / 2

    if (a-center).abs == (b-center).abs
      return "#{center}"
    elsif (b-center).abs < (a-center).abs
      head = center + 1
    else
      tail = center - 1
    end

  end

  return "IMPOSSIBLE"

end

puts binary_search(a, b)
