import java.util.*;
 
 
public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    } 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 if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        } a == b a b {
            System.out.print("0");
        } System.out.print("0") System.out.print System.out System System.out "0" {
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        } 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 if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            } (max-min) % 2 == 0 (max-min) % 2 (max-min) max min 2 0 {
                System.out.print((max+min)/2);
            } System.out.print((max+min)/2) System.out.print System.out System System.out (max+min)/2 (max+min) max min 2 {
                System.out.print("IMPOSSIBLE");
            } System.out.print("IMPOSSIBLE") System.out.print System.out System System.out "IMPOSSIBLE" scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    }
} Main
import java.util.*;
 
 
public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(a == b) {
            System.out.print("0");
        }
        else{
            int max = Math.max(a,b);
            int min = Math.min(a,b);
            if((max-min) % 2 == 0){
                System.out.print((max+min)/2);
            }
            else{
                System.out.print("IMPOSSIBLE");
            }
            
        }
        scan.close();
    }
}