#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll a,b;
	cin>>a>>b;
	ll k=(b*b-a*a)/(2*b-2*a);
	if(abs(a-k)==abs(b-k)) cout<<k;
	else cout<<"IMPOSSIBLE";
	return 0;
} 