stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>



 int main() {

        double n,a,b;

        scanf("%lf %lf",&a,&b);

        n = (a+b)/2.0;

        if(floor(n)==ceil(n))

        printf("%.0lf\n",n);

        else

        printf("IMPOSSIBLE\n");

        

     

        

        return 0;

    }

// Faster C++ solution for the same problem (measured speedup: 5.250701124621972x):
#include<stdio.h>

#include<math.h>

int main()

{

    int a,b,k;

    int c=0;

    scanf("%d%d",&a,&b);



 if((a+b)%2==0)



      {

           k=(a+b)/2;

          printf("%d",k);

      }

 else

       {

           printf("IMPOSSIBLE");

       }





return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main(void){

    int a, b;

    cin>>a>>b;

    int k= (a+b)/2;

    cout<<( abs(a-k)==abs(b-k) ? to_string(k) : "IMPOSSIBLE")<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.279891911428952x):
#include<stdio.h>

#include<math.h>

int main()

{

    int a,b,k;

    int c=0;

    scanf("%d%d",&a,&b);



 if((a+b)%2==0)



      {

           k=(a+b)/2;

          printf("%d",k);

      }

 else

       {

           printf("IMPOSSIBLE");

       }





return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 1.8288983640436274x):
#include<bits/stdc++.h>



using namespace std;

int main()

{



long int a,b,i,c=0,ans;

cin>>a>>b;

if(a<b)

{

for(i=a;i<=b;i++)

{

  if(abs(a-i)==abs(b-i))  

        {

        c++;

ans=i;

           break; 

        

    }

    



}

if(c==0)

cout<<"IMPOSSIBLE"<<endl;

else



cout<<i<<endl;

}



else 

{



for(i=b;i<=a;i++)

{

  if(abs(a-i)==abs(b-i))  

        {

        c++;

ans=i;

           break; 

        

    }

    



}

if(c==0)

cout<<"IMPOSSIBLE"<<endl;

else



cout<<i<<endl;



}













return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 2.2828382546410992x):
#include<iostream>

using namespace std;

long long mod(long long a)

{

    if(a<0)

        return a*-1;

    else

        return a;

}

int main()

{

    long long a,b,c,m1,m2;

    cin>>a>>b;

    c=(a+b)/2;

    m1=mod(a-c);

    m2=mod(b-c);

    if(m1==m2)

        cout<<c;

    else

        cout<<"IMPOSSIBLE";

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 2.2791122072702112x):
#include <bits/stdc++.h>

using namespace std;



bool Harmony(long A, long B){



    if((A+B)%2==0)

        return true;

    else

        return false;



}

int main(){



    long a,b;

    cin>>a>>b;



    if(Harmony(a,b))

        cout<< (a+b)/2<<endl;

    else

        cout<<"IMPOSSIBLE"<<endl;





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 2.2819330311139665x):
#include "iostream"

using namespace std;

int main()

{

long long int a,b;

cin>>a>>b;

//if((a%2==0 && b%2==0) || (a%2!=0 && b%2!=0))

if(a+b==(a+b)/2*2)

cout<<(a+b)/2;

else 

cout<<"IMPOSSIBLE";

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 2.2483254178080276x):
//  ©   ___MRX___



#include <bits/stdc++.h>

    using namespace std;



#define ll long long int



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);



    int a, b, x;

    cin >> a >> b;

    x = a + b;



    if(x % 2) {

        cout << "IMPOSSIBLE" << '\n';

    }

    else {

        cout << x / 2 << '\n';

    }



    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}


// Faster C++ solution for the same problem (measured speedup: 2.2785283895178527x):
#include<iostream>

#include<string>

#include<map>

using namespace std;

int main()

{

long long int i,j,k,a,b;

cin>>a>>b;

if((a+b)%2==0)

{

cout<<(a+b)/2<<endl;

}

else

cout<<"IMPOSSIBLE"<<endl;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

   int a,b,k;

   cin>>a>>b;



   k=(a+b)/2;

   if(a%2==0 && b%2==0 || a%2!=0 && b%2!=0)

        cout<<k<<endl;

   else

        cout<<"IMPOSSIBLE"<<endl;





}


// Faster C++ solution for the same problem (measured speedup: 5.268362099913082x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#include<iostream>

using namespace std;



int main(){

    int a,b,value=0;

    int flag=0;

    cin>>a;

    cin>>b;

    if(a<b){

    for(int i=a;i<b;i++){

        if(i-a==b-i){

            flag=1;

            value=i;

        }

    }

    }

    else{

            for(int i=b;i<a;i++){

              if(i-b==a-i){

                  flag=1;

                  value=i;

        }

    }

    }



    if(flag==1){

        cout<<value;

    }

    else{

        cout<<"IMPOSSIBLE";

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 8.212940881910956x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <iostream>

#include<math.h>

#include<cmath>



using namespace std;



int main()

{

    long long a,b,k,result;

    cin>>a>>b;

    long long temp = b - a;

    long long res = temp/2;



    result = b - res;





    if(abs(b-result) == abs(a - result)){

        cout<<result<<endl;

    }





    else

        cout<<"IMPOSSIBLE"<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264181199422515x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define sf scanf

#define pf printf

 

int main()

{

	int a,b;

	sf("%d%d",&a,&b);

	if(a==b||-a==b||a==-b){

		pf("0\n");

	}

	if(a>b){

		swap(a,b);

	}

	for(int i=a;i<b;i++){

		if(-(a-i)==(b-i)){

		

			pf("%d\n",i);

			return 0;

		}

	}

	pf("IMPOSSIBLE\n");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 11.400633905157694x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main(){

      int a,b,sum,d;

      cin>>a>>b;

      sum= a+b ;

      if(sum%2==1){

        cout<<"IMPOSSIBLE"<<endl;

      }

      else{

         d=sum/2;

         cout<<d<<endl;



      }





}

// Faster C++ solution for the same problem (measured speedup: 5.268571519362026x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <iostream>

#include <algorithm>

#include <cmath>

using namespace std;

int main()

{

	long long int a,b;

	scanf("%lld %lld",&a,&b);

	int ans=0;

	if(a>b)

	{

		int t;

		t = a;

		a = b;

		b = t;

	}

	for (long long int i=a;i<=b;i++)

	{

		if(labs(a-i)==labs(b-i))

		{

			

			ans = i;

			cout << ans;

			return 0;

		}

	}	

	cout << "IMPOSSIBLE";



	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 9.165053873904915x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    long long int a,b;

    cin >> a>> b;

    if((a+b)&1) cout << "IMPOSSIBLE\n" ;

    else cout << (a+b)/2 << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.263488400331608x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main()

{

    long long int a,b;

    cin>>a>>b;

    if(a%2==b%2)

    {

        cout<<(a+b)/2<<endl;

    }

    else

    {

        cout<<"IMPOSSIBLE"<<endl;

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.264061869677762x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <iostream>

using std:: cout;

using std:: cin;

using std::endl;







int main() {



long num1, num2;

cin >> num1 >> num2;



if(num1 % 2 != num2 % 2) {

cout << "IMPOSSIBLE" << endl; //bc both of them need to be divided by 2

}



else {

cout << (num1 + num2) / 2 << endl; //bc k = (num1 + num2) / 2 if u add A and B

}

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.263610692054495x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int A,B,K;

    cin>>A;

    cin>>B;

    K=(A+B)/2;

    if((A+B)%2==0)

    {

        cout<<K<<endl;

    }

    else

    {

        cout<<"IMPOSSIBLE"<<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.268060312315227x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main(){

    int a,b,div,sum=0;

    cin>>a>>b;



    sum=a+b;



    if(sum%2==0){

        div=sum/2;

        cout<<div;

    }else{

        cout<<"IMPOSSIBLE";

    }





}


// Faster C++ solution for the same problem (measured speedup: 5.2593682127979875x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    long long int a,b,k;

    cin >> a >> b;

    if((a+b)%2==0){

        k=(a+b)/2;

        cout << k << endl;

    }

    else{

        cout << "IMPOSSIBLE" << endl;

    }



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.264157139046281x):
#include<stdio.h>

int main()

{

    int a,b,k,c=0;

    scanf("%d %d",&a,&b);

if((a+b)%2==0)

    {

    k=(a+b)/2;

    printf("%d",k);

    }

else

    {

    printf("IMPOSSIBLE");

    }

return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <stdio.h>

#include <algorithm>

using namespace std;

#define r(i,n) for(int i=0;i<n;i++)

#define rn(i,n) for(int i=1;i<=n;i++)



int main(void){

  int a,b,ans=-1;

  cin>>a>>b;



  for(int i=min(a,b);i<max(a,b);i++){

    if(abs(a-i)==abs(b-i))ans=i;

  }

  if(ans==-1)cout<<"IMPOSSIBLE"<<endl;

  else cout<<ans<<endl;



  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 2.1795074622668946x):
#include <bits/stdc++.h>

#include <stdio.h>

#include <algorithm>

using namespace std;

#define r(i,n) for(int i=0;i<n;i++)

#define rn(i,n) for(int i=1;i<=n;i++)



int main(void){

  int a,b,ans=-1;

  cin>>a>>b;

  if((a+b)%2==0)cout<<(a+b)/2<<endl;

  else cout<<"IMPOSSIBLE"<<endl;



  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    if((a+b)%2==0)

    {

        cout<<(a+b)/2<<endl;

    }

    else cout<<"IMPOSSIBLE"<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.267205681755204x):
#include<stdio.h>

int main()

{

    int x,y,c;

    scanf("%d%d",&x,&y);

    if(x%2 != y%2)

    {

    printf("IMPOSSIBLE\n");

    }

    else

    {

        c=(x+y)/2;

        printf("%d",c);

    }

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main()

{

     long long int a,b,c,s=0;

     cin>>a>>b;

     s=(a+b)/2;

     if(abs(a-s)==abs(b-s))cout<<s<<endl;

     else

        cout<<"IMPOSSIBLE"<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.263507900686594x):
#include<stdio.h>

int main()

{

    int x,y,c;

    scanf("%d%d",&x,&y);

    if(x%2 != y%2)

    {

    printf("IMPOSSIBLE\n");

    }

    else

    {

        c=(x+y)/2;

        printf("%d",c);

    }

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.2785283895178527x):
#include<iostream>

#include<vector>

#include<algorithm>

#include<math.h>

#include<iomanip>

#include<map>

#include<deque>

using namespace std;

typedef long long ll;

 

int main() {

    ll a, b; cin >> a >> b;

    if ((a + b) % 2 == 0) cout << (a + b) / 2 << endl;

    else cout << "IMPOSSIBLE" << endl;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.221185218200138x):
#include <bits/stdc++.h>

using namespace std;



int main() {

    ios::sync_with_stdio(0);

    cin.tie(0);

    double n,a,b; cin >> a >> b;

    n = (a+b)/2.0;

    if(floor(n)==ceil(n))

    printf("%.0lf\n",n);

    else

    printf("IMPOSSIBLE\n");

    return 0;   

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.280408824836438x):
#include <iostream>

using namespace std;



typedef int64_t ll;

int main()

{

	int a, b;

	cin >> a >> b;

	int ans = -1;

	int pref = (a + b) / 2;

	if (abs(a - pref) == abs(b - pref)) {

		cout << pref;

	}

	else {

		cout << "IMPOSSIBLE" << endl;

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 1.8317033041621928x):
#include<iostream>

using namespace std;

int main()

{

    long int A, B, K;

    cin >> A >> B;

    if(A > B)

    {

        K = B;

        while(K < A)

        {

            K++;

            if(A - K == K - B)

            {

                cout << K;

                return 0;

            }

        }

    }

    else

    {

        K = A;

        while(K < B)

        {

            K++;

            if(B - K == K - A)

            {

                cout << K;

                return 0;

            }

        }

    }

    cout << "IMPOSSIBLE";

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.2828075354699786x):
#include<bits/stdc++.h>



using namespace std;







int main()

{

    long long a,b,p;



    cin >> a >>  b;



    long long k;



    k=min(a,b);



    p=abs(a-b);







    if(p%2!=0)

    {

        cout << "IMPOSSIBLE";

    }

    else

    {

        p=p/2;



        cout << k+p;

    }





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.2786047688668853x):
#include <bits/stdc++.h>

using namespace std;



int main ()

{

	long long int a, b;

    cin >> a >> b;



	if(a%2 != b%2)

    {

		cout<<"IMPOSSIBLE"<<endl;

	}



	else

	cout<<(a+b)/2<<endl;



    return 0;



}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.280416392595063x):
#include<bits/stdc++.h>

using namespace std;

int A,B,K;



int main(){

    cin>>A>>B;

    if((A+B)%2==0){

        cout<<(A+B)/2;

    }

    else{

        cout<<"IMPOSSIBLE";

    }

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.2807122723543953x):
#include <iostream>

#include<cmath>

using namespace std;



int main()

{

    int a,b;

    cin>>a>>b;





    if((a+b)%2==0)

        cout<<(a+b)/2;

    else

        cout<<"IMPOSSIBLE";





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <math.h>



using namespace std;



int main(){



    

    long long a,b,min,max,num=0;



    cin>>a;

    cin>>b;



    if(a<b){

        min = a;

        max = b;

    }else{

        min = b;

        max = a;

    }



    for (int i = min+1; i <= max; i++)

    {   

        if(abs(a-i) == abs(b-i)){

            num = i;

        }

    }



    if(num != 0){

        cout<<num<<endl;

    }else{

        cout<<"IMPOSSIBLE"<<endl;

    }

    

}

// Faster C++ solution for the same problem (measured speedup: 2.2786047688668853x):
#include<iostream>

using namespace std;



int main()

{

    long long A,B,res=0;

  cin >> A >> B ;

    if(A%2==B%2)

    {

        res=(A+B)/2;

        cout << res<< endl;



    }

    else{

        cout << "IMPOSSIBLE"<<endl;

    }

    return 0;

}