#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long a,b;
    cin>>a>>b;
    int x=a/2;
    int y=b/2;
    int m=x+y;
    int k=abs(a-m);
    int l=abs(b-m);
    if(k==l) cout<<m<<endl;
    else cout<<"IMPOSSIBLE"<<endl;
    return 0;
}
