#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int a,b,i,j;
    cin>>a>>b;

    for(i=min(a,b);i<=max(a,b);i++)
    {
        if(abs(a-i)==abs(b-i))
        {
            cout<<i<<endl;
            return 0;
        }
    }

    cout<<"IMPOSSIBLE\n";

    return 0;
}
