import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int answer=0;
        int max =Math.max(a,b);
        int min = Math.min(a,b);
        for(int i=0;;i++){
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        }
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int answer=0;
        int max =Math.max(a,b);
        int min = Math.min(a,b);
        for(int i=0;;i++){
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        }
    }
} Main public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int answer=0;
        int max =Math.max(a,b);
        int min = Math.min(a,b);
        for(int i=0;;i++){
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        }
    } main {
        Scanner scn=new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int answer=0;
        int max =Math.max(a,b);
        int min = Math.min(a,b);
        for(int i=0;;i++){
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        }
    } Scanner scn=new Scanner(System.in); scn new Scanner(System.in) int a=scn.nextInt(); a scn.nextInt() scn.nextInt scn int b=scn.nextInt(); b scn.nextInt() scn.nextInt scn int answer=0; answer 0 int max =Math.max(a,b); max Math.max(a,b) Math.max Math a b int min = Math.min(a,b); min Math.min(a,b) Math.min Math a b for(int i=0;;i++){
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        } int i=0; int i=0; i 0 i++ i++ i {
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        } {
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        } if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            } max<=0&&min<=0||(a+b)%2==1 max<=0&&min<=0 max<=0 max 0 min<=0 min 0 (a+b)%2==1 (a+b)%2 (a+b) a b 2 1 {
                System.out.println("IMPOSSIBLE");
                break;
            } System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" break; if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            } Math.abs(max)==Math.abs(min) Math.abs(max) Math.abs Math max Math.abs(min) Math.abs Math min {
                System.out.println(answer);
                break;
            } System.out.println(answer) System.out.println System.out System System.out answer break; max-- max min-- min answer++ answer String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args) {
        Scanner scn=new Scanner(System.in);
        int a=scn.nextInt();
        int b=scn.nextInt();
        int answer=0;
        int max =Math.max(a,b);
        int min = Math.min(a,b);
        for(int i=0;;i++){
            if(max<=0&&min<=0||(a+b)%2==1){
                System.out.println("IMPOSSIBLE");
                break;
            }
            if(Math.abs(max)==Math.abs(min)){
                System.out.println(answer);
                break;
            }
            max--;
            min--;
            answer++;
        }
    }
}
