import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	} 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 dif = Math.abs(A-B); dif Math.abs(A-B) Math.abs Math A-B A B int ans; ans if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		} dif%2 == 0 dif%2 dif 2 0 {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		} ans = Math.max(A, B)-dif/2 ans Math.max(A, B)-dif/2 Math.max(A, B) Math.max Math A B dif/2 dif 2 System.out.println(ans) System.out.println System.out System System.out ans {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int dif = Math.abs(A-B);
		int ans;
		
		if(dif%2 == 0) {
			ans = Math.max(A, B)-dif/2;
			System.out.println(ans);
		}else {
			System.out.println("IMPOSSIBLE");
		}
	}
}