import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String ans;
		int sub = Math.abs(a - b);

		if (sub % 2 != 0)
			ans = "IMPOSSIBLE";
		else
			ans = Integer.toString(sub / 2 + Math.min(a, b));

		System.out.println(ans);

		sc.close();
	}

} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String ans;
		int sub = Math.abs(a - b);

		if (sub % 2 != 0)
			ans = "IMPOSSIBLE";
		else
			ans = Integer.toString(sub / 2 + Math.min(a, b));

		System.out.println(ans);

		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String ans;
		int sub = Math.abs(a - b);

		if (sub % 2 != 0)
			ans = "IMPOSSIBLE";
		else
			ans = Integer.toString(sub / 2 + Math.min(a, b));

		System.out.println(ans);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String ans;
		int sub = Math.abs(a - b);

		if (sub % 2 != 0)
			ans = "IMPOSSIBLE";
		else
			ans = Integer.toString(sub / 2 + Math.min(a, b));

		System.out.println(ans);

		sc.close();
	} 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 String ans; ans int sub = Math.abs(a - b); sub Math.abs(a - b) Math.abs Math a - b a b if (sub % 2 != 0)
			ans = "IMPOSSIBLE";
		else
			ans = Integer.toString(sub / 2 + Math.min(a, b)); sub % 2 != 0 sub % 2 sub 2 0 ans = "IMPOSSIBLE" ans "IMPOSSIBLE" ans = Integer.toString(sub / 2 + Math.min(a, b)) ans Integer.toString(sub / 2 + Math.min(a, b)) Integer.toString Integer sub / 2 + Math.min(a, b) sub / 2 sub 2 Math.min(a, b) Math.min Math a b System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();

		String ans;
		int sub = Math.abs(a - b);

		if (sub % 2 != 0)
			ans = "IMPOSSIBLE";
		else
			ans = Integer.toString(sub / 2 + Math.min(a, b));

		System.out.println(ans);

		sc.close();
	}

}
