import java.util.Scanner;

public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

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

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

	}
} Main public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

	} main {

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

	} 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 int max = (a < b) ? b : a; max (a < b) ? b : a (a < b) a b b a int answer = -1; answer -1 1 for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		} int i = 0; int i = 0; i 0 i < max i max i++ i++ i {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		} {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		} if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(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 {
				answer = Math.abs(i);
				break;
			} answer = Math.abs(i) answer Math.abs(i) Math.abs Math i break; System.out.println(answer == -1 ? "IMPOSSIBLE" : answer) System.out.println System.out System System.out answer == -1 ? "IMPOSSIBLE" : answer answer == -1 answer -1 1 "IMPOSSIBLE" answer String args[] args public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

	}
} public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);

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

		int max = (a < b) ? b : a;
		int answer = -1;

		for(int i = 0;i < max;i++) {
			if(Math.abs(a - i) == Math.abs(b - i)) {
				answer = Math.abs(i);
				break;
			}
		}

		System.out.println(answer == -1 ? "IMPOSSIBLE" : answer);

	}
}
