import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	} main {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A  = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B  = scan.nextInt(); B scan.nextInt() scan.nextInt scan int a=0; a 0 int b = 0; b 0 for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        } int i= (A<B)?A:B ; int i= (A<B)?A:B ; i (A<B)?A:B (A<B) A B A B i < ((A<B)?B:A) i ((A<B)?B:A) (A<B) A B B A i++ i++ i {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        } {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        } if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	} 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 {

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	} System.out.println(String.valueOf(i)) System.out.println System.out System System.out String.valueOf(i) String.valueOf String i return ; System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner scan = new Scanner(System.in);
	        int A  = scan.nextInt();
	        int B  = scan.nextInt();
	        int a=0;
	        int b = 0;
	        for(int i= (A<B)?A:B ;i < ((A<B)?B:A);i++) {
	           	if(Math.abs(A-i) == Math.abs(B-i)){

	           		System.out.println(String.valueOf(i));
	           		return ;
	        	}
	        }
	        System.out.println("IMPOSSIBLE");
	}

}
