#include<bits/stdc++.h>
using namespace std;
int main()
{
    double A,B;
    int a,b;
    cin>>A>>B;
    a=A;
    b=B;
    long double K;
    long long k;
    K=(A+B)/2;
    k=(a+b)/2;
    if(K==k){
        cout<<k<<endl;
    }
    else{
        cout<<"IMPOSSIBLE"<<endl;
    }
    return 0;
}
