#include<bits/stdc++.h>
using namespace std;
int main(){
   int a,b;
   int sum1=0,sum2=0,small=0,great=0,store=0;
   cin>>a>>b;

  /* if(a==0||b==0||a==b){
    cout<<"NO"<<endl;
   }

   else {*/
        if(a<b){
         small=a;
         great=b;
        }
   else {
    small=b;
    great=a;
   }
   for(int i=small;i<=great;i++){
    sum1=abs(a-i);
    sum2=abs(b-i);
    if(sum1==sum2){

        store=i;
        break;

    }


   }
  // cout<<store<<endl;
   if(sum1==sum2){
    cout<<store<<endl;

   }
   else
    cout<<"IMPOSSIBLE"<<endl;




}
