import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	} main {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan scan.close() scan.close scan if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		} Math.abs(a-b)%2==0 Math.abs(a-b)%2 Math.abs(a-b) Math.abs Math a-b a b 2 0 {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		} System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2)) System.out.println System.out System System.out (a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2) (a>b) a b Math.abs(a-Math.abs(a-b)/2) Math.abs Math a-Math.abs(a-b)/2 a Math.abs(a-b)/2 Math.abs(a-b) Math.abs Math a-b a b 2 Math.abs(a+Math.abs(a-b)/2) Math.abs Math a+Math.abs(a-b)/2 a Math.abs(a-b)/2 Math.abs(a-b) Math.abs Math a-b a b 2 {
			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) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		scan.close();

		if(Math.abs(a-b)%2==0) {
			System.out.println((a>b)? Math.abs(a-Math.abs(a-b)/2) : Math.abs(a+Math.abs(a-b)/2));
		}else {
			System.out.println("IMPOSSIBLE");
		}

	}
}
