import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	}
} Main public static void main(String[] args) {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	} main {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	} int big = 0; big 0 int small = 0; small 0 int tyuou = 0; tyuou 0 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 if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		} A > B A B {
			big = A;
			small = B;
		} big = A big A small = B small B {
			big = B;
			small = A;
		} big = B big B small = A small A while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		} big != 0 big 0 {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		} big-- big small++ small if(big == small) {
				tyuou = big;
				break;
			} big == small big small {
				tyuou = big;
				break;
			} tyuou = big tyuou big break; if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		} tyuou == 0 tyuou 0 {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" {
			System.out.println(tyuou);
		} System.out.println(tyuou) System.out.println System.out System System.out tyuou String[] args args public class Main {
	public static void main(String[] args) {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	}
} public class Main {
	public static void main(String[] args) {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int big = 0;
		int small = 0;
		int tyuou = 0;
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		if(A > B) {
			big = A;
			small = B;
		}else {
			big = B;
			small = A;
		}
		while(big != 0) {
			big--;
			small++;
			if(big == small) {
				tyuou = big;
				break;
			}
		}
		if(tyuou == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(tyuou);
		}
	}
}