program kadai
implicit none
integer  ::  a,b,i,k


read(*,*) a,b

if (a<b) then
    k=b
else if (a>b) then
    k=a
end if

do while(k>0)
    if (abs(a-k)==abs(b-k)) then
        write(*,*) k
        stop
    end if
    k=k-1
end do

write(*,*) "IMPOSSIBLE"


stop

end program kadai