import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	}
} Main public static void main(String[] args) {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	} main {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	} int ans = 0; ans 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc int k = Math.abs(n-d); k Math.abs(n-d) Math.abs Math n-d n d if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		} k % 2 == 0 k % 2 k 2 0 {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			} n < d n d {
				System.out.println(n+(k/2));
			} System.out.println(n+(k/2)) System.out.println System.out System System.out n+(k/2) n (k/2) k 2 {
				System.out.println(d+(k/2));
			} System.out.println(d+(k/2)) System.out.println System.out System System.out d+(k/2) d (k/2) k 2 {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int ans = 0;

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
//
//		int[] array = new int[n];
//		for (int i = 0; i < n; i++) {
//			array[i] = sc.nextInt();
//		}
		int k = Math.abs(n-d);

		if(k % 2 == 0) {
			if(n < d) {
				System.out.println(n+(k/2));
			} else {
				System.out.println(d+(k/2));
			}
		} else {
			System.out.println("IMPOSSIBLE");
		}

		sc.close();
	}
}
