import java.util.*;

class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int ind = Math.max(a, b);
		
		boolean flag = false;
		int ans = 0;
		
		for(int i = 1; i < ind; ++i) {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		}
		if(flag) System.out.println(ans);
		else System.out.println("IMPOSSIBLE");
		
	}
} import java.util.*; util.* java class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int ind = Math.max(a, b);
		
		boolean flag = false;
		int ans = 0;
		
		for(int i = 1; i < ind; ++i) {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		}
		if(flag) System.out.println(ans);
		else System.out.println("IMPOSSIBLE");
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int ind = Math.max(a, b);
		
		boolean flag = false;
		int ans = 0;
		
		for(int i = 1; i < ind; ++i) {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		}
		if(flag) System.out.println(ans);
		else System.out.println("IMPOSSIBLE");
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int ind = Math.max(a, b);
		
		boolean flag = false;
		int ans = 0;
		
		for(int i = 1; i < ind; ++i) {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		}
		if(flag) System.out.println(ans);
		else System.out.println("IMPOSSIBLE");
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ind = Math.max(a, b); ind Math.max(a, b) Math.max Math a b boolean flag = false; flag false int ans = 0; ans 0 for(int i = 1; i < ind; ++i) {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		} int i = 1; int i = 1; i 1 i < ind i ind ++i ++i i {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		} {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		} if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false; Math.abs(a - i) == Math.abs(b - i) Math.abs(a - i) Math.abs Math a - i a i Math.abs(b - i) Math.abs Math b - i b i {
		        flag = true;
		        ans = i;
		        break;
		    } flag = true flag true ans = i ans i break; flag = false flag false if(flag) System.out.println(ans);
		else System.out.println("IMPOSSIBLE"); flag System.out.println(ans) System.out.println System.out System System.out ans System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args
import java.util.*;

class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		
		int ind = Math.max(a, b);
		
		boolean flag = false;
		int ans = 0;
		
		for(int i = 1; i < ind; ++i) {
		    if(Math.abs(a - i) == Math.abs(b - i)){
		        flag = true;
		        ans = i;
		        break;
		    }
		    else flag = false;
		}
		if(flag) System.out.println(ans);
		else System.out.println("IMPOSSIBLE");
		
	}
}