import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    }

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

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    }

} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    } main {

        Scanner sc = new Scanner(System.in);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] abt = sc.nextLine().split(" "); abt sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int A = Integer.parseInt(abt[0]); A Integer.parseInt(abt[0]) Integer.parseInt Integer abt[0] abt 0 int B = Integer.parseInt(abt[1]); B Integer.parseInt(abt[1]) Integer.parseInt Integer abt[1] abt 1 boolean isMatch = false; isMatch false for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        } int i = 0; int i = 0; i 0 i < Math.max(A, B) i Math.max(A, B) Math.max Math A B i++ i++ i {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        } {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        } if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            } 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);
                isMatch = true;
            } System.out.println(i) System.out.println System.out System System.out i isMatch = true isMatch true if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        } !isMatch isMatch {
            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);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    }

} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String[] abt = sc.nextLine().split(" ");
        int A = Integer.parseInt(abt[0]);
        int B = Integer.parseInt(abt[1]);

        boolean isMatch = false;
        for (int i = 0; i < Math.max(A, B); i++) {

            if (Math.abs(A - i) == Math.abs(B - i)) {
                System.out.println(i);
                isMatch = true;
            }
        }
        if (!isMatch) {
            System.out.println("IMPOSSIBLE");

        }
    }

}
