import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	}

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

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	}

} Main public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	} main {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt(); b in.nextInt() in.nextInt in int max = Math.max(a, b); max Math.max(a, b) Math.max Math a b int k = 0; k 0 for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		} int i = 1; int i = 1; i 1 i<=max i max i++ i++ i {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		} {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		} if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			} 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 {
				k = i;
			} k = i k i if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		} k == 0 k 0 {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" {
			System.out.println(k);
		} System.out.println(k) System.out.println System.out System System.out k String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt(), b = in.nextInt();
		
		int max = Math.max(a, b);
		
		int k = 0;
		
		for(int i = 1;i<=max;i++) {
			if(Math.abs(a-i) == Math.abs(b-i)) {
				k = i;
			}
		}
		
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}
		else {
			System.out.println(k);
		}

	}

}
