import java.util.Scanner;

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());
//		String s = sc.next();
		int i = 0;
		if(A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
			return;
		}
		while(true) {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		}

		System.out.println(i);


	}

} import java.util.Scanner; Scanner 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());
//		String s = sc.next();
		int i = 0;
		if(A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
			return;
		}
		while(true) {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		}

		System.out.println(i);


	}

} 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());
//		String s = sc.next();
		int i = 0;
		if(A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
			return;
		}
		while(true) {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		}

		System.out.println(i);


	} main {

		Scanner sc = new Scanner(System.in);

		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
//		String s = sc.next();
		int i = 0;
		if(A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
			return;
		}
		while(true) {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		}

		System.out.println(i);


	} 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 i = 0; i 0 if(A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
			return;
		} A%2 != B%2 A%2 A 2 B%2 B 2 {
			System.out.println("IMPOSSIBLE");
			return;
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" return; while(true) {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		} true {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		} if(Math.abs(A-i)==Math.abs(B-i))break; 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 break; i++ i System.out.println(i) System.out.println System.out System System.out i String[] args args
import java.util.Scanner;

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());
//		String s = sc.next();
		int i = 0;
		if(A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
			return;
		}
		while(true) {

			if(Math.abs(A-i)==Math.abs(B-i))break;

			i++;
		}

		System.out.println(i);


	}

}
