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

num = (a - b).abs / 2

num2 = num + (num / 2)

num.upto(num2) do |k|
  if (a - k).abs == (b - k).abs
    puts k
    break
  end

  if k == 1
    puts 'IMPOSSIBLE'
    break
  end
end
