import java.util.*;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	}
} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int ans = 0; ans 0 if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		} a % 2 == 0  && b % 2 == 1 a % 2 == 0 a % 2 a 2 0 b % 2 == 1 b % 2 b 2 1 out.println("IMPOSSIBLE") out.println out "IMPOSSIBLE" if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		} a % 2 == 1 && b % 2 == 0 a % 2 == 1 a % 2 a 2 1 b % 2 == 0 b % 2 b 2 0 out.println("IMPOSSIBLE") out.println out "IMPOSSIBLE" {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		} int n = Math.abs(a - b) / 2; n Math.abs(a - b) / 2 Math.abs(a - b) Math.abs Math a - b a b 2 ans = Math.max(a, b) - n ans Math.max(a, b) - n Math.max(a, b) Math.max Math a b n out.println(ans) out.println out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	}
} Main
import java.util.*;
import static java.lang.System.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans = 0;
		
		if(a % 2 == 0  && b % 2 == 1)
			out.println("IMPOSSIBLE");
		else if(a % 2 == 1 && b % 2 == 0)
			out.println("IMPOSSIBLE");
		else {
			int n = Math.abs(a - b) / 2;
			ans = Math.max(a, b) - n;
			out.println(ans);
		}		
	}
}
