// Learn more about F# at http://fsharp.org

open System

[<EntryPoint>]
let main _argv =
    let ab = stdin.ReadLine().Split(' ') |> Array.map int
    let a = ab.[0]
    let b = ab.[1]
    
    let maxNum = max a b
    
    let mutable res = 0
    for i in 1..maxNum do
        if abs(a - i) = abs(b - i) then
            res <- i
    
    if res = 0 then
        printfn "IMPOSSIBLE"
    else
        printfn "%d" res
    0 // return an integer exit code
