import java.util.Scanner;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int A;
        int B;
        int C;
        int min;

        A = sc.nextInt();
        B = sc.nextInt();

        if (A > B) {
            C = A - B;
            min = B;
        } else {
            C = B - A;
            min = A;
        }

        if (C % 2 == 0) {
            System.out.println(C/2+min);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int A;
        int B;
        int C;
        int min;

        A = sc.nextInt();
        B = sc.nextInt();

        if (A > B) {
            C = A - B;
            min = B;
        } else {
            C = B - A;
            min = A;
        }

        if (C % 2 == 0) {
            System.out.println(C/2+min);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int A;
        int B;
        int C;
        int min;

        A = sc.nextInt();
        B = sc.nextInt();

        if (A > B) {
            C = A - B;
            min = B;
        } else {
            C = B - A;
            min = A;
        }

        if (C % 2 == 0) {
            System.out.println(C/2+min);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int A;
        int B;
        int C;
        int min;

        A = sc.nextInt();
        B = sc.nextInt();

        if (A > B) {
            C = A - B;
            min = B;
        } else {
            C = B - A;
            min = A;
        }

        if (C % 2 == 0) {
            System.out.println(C/2+min);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A; A int B; B int C; C int min; min A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc if (A > B) {
            C = A - B;
            min = B;
        } else {
            C = B - A;
            min = A;
        } A > B A B {
            C = A - B;
            min = B;
        } C = A - B C A - B A B min = B min B {
            C = B - A;
            min = A;
        } C = B - A C B - A B A min = A min A if (C % 2 == 0) {
            System.out.println(C/2+min);
        } else {
            System.out.println("IMPOSSIBLE");
        } C % 2 == 0 C % 2 C 2 0 {
            System.out.println(C/2+min);
        } System.out.println(C/2+min) System.out.println System.out System System.out C/2+min C/2 C 2 min {
            System.out.println("IMPOSSIBLE");
        } System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String args[] args
import java.util.Scanner;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int A;
        int B;
        int C;
        int min;

        A = sc.nextInt();
        B = sc.nextInt();

        if (A > B) {
            C = A - B;
            min = B;
        } else {
            C = B - A;
            min = A;
        }

        if (C % 2 == 0) {
            System.out.println(C/2+min);
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
}
