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 N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    }
    
}
 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 N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    }
    
} Main public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		int N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    } main {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		int N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    } 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 N = 0; N 0 if(A>B) {
			N = A;
		}else {
			N = B;
		} A>B A B {
			N = A;
		} N = A N A {
			N = B;
		} N = B N B int wk = 0; wk 0 for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		} {
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		} if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        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(i);
		   		sc.close();
		        return ;
			} System.out.println(i) System.out.println System.out System System.out i sc.close() sc.close sc return ; System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" sc.close() sc.close sc return ; 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 N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    }
    
} public class Main {

    public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		int N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    }
    
} 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 N = 0;
		
		if(A>B) {
			N = A;
		}else {
			N = B;
		}
		
		int wk = 0;
		
		for(int i = 0;i < N;i++){
			if(Math.abs(A-i)==Math.abs(B-i)) {
				System.out.println(i);
		   		sc.close();
		        return ;
			}
		}
		
		System.out.println("IMPOSSIBLE");

   		sc.close();
        return ;

    }
    
}

