let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

let div = ( arr[1] - arr[0] ) / 2
if ( ( abs( arr[1] - arr[0] ) % 2 ) > 0 ) {
  print( "IMPOSSIBLE" )
} else {
  print( arr[0] + div ) 
}