import 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 tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } 
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        int tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } 
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        int tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        int tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } 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 tmp = (a + b) / 2; tmp (a + b) / 2 (a + b) a b 2 if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        } Math.abs(a - tmp) == Math.abs(b - tmp) Math.abs(a - tmp) Math.abs Math a - tmp a tmp Math.abs(b - tmp) Math.abs Math b - tmp b tmp {
            System.out.println(tmp);
        } System.out.println(tmp) System.out.println System.out System System.out tmp if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        } Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1) Math.abs(a - tmp + 1) Math.abs Math a - tmp + 1 a - tmp a tmp 1 Math.abs(b - tmp + 1) Math.abs Math b - tmp + 1 b - tmp b tmp 1 {
            System.out.println(tmp - 1);
        } System.out.println(tmp - 1) System.out.println System.out System System.out tmp - 1 tmp 1 if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        } Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1) Math.abs(a - tmp - 1) Math.abs Math a - tmp - 1 a - tmp - 1 a tmp 1 Math.abs(b - tmp - 1) Math.abs Math b - tmp - 1 b - tmp - 1 b tmp 1 {
            System.out.println(tmp + 1);
        } System.out.println(tmp + 1) System.out.println System.out System System.out tmp + 1 tmp 1 {
            System.out.println("IMPOSSIBLE");
        } 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[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        int tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } 
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        int tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } 
} Main
import 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 tmp = (a + b) / 2;
        if(Math.abs(a - tmp) == Math.abs(b - tmp)) {
            System.out.println(tmp);
        } else if(Math.abs(a - tmp + 1) == Math.abs(b - tmp + 1)) {
            System.out.println(tmp - 1);
        } else if(Math.abs(a - tmp - 1) == Math.abs(b - tmp - 1)) {
            System.out.println(tmp + 1);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } 
}