import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        calculation(a, b);
    }

    public static void calculation(int a, int b) {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    }
} import java.util.Scanner; Scanner 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();
        calculation(a, b);
    }

    public static void calculation(int a, int b) {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        calculation(a, b);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        calculation(a, b);
    } 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 calculation(a, b) calculation a b String[] args args public static void calculation(int a, int b) {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    } calculation {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    } int sub = a > b ? a - b : b - a; sub a > b ? a - b : b - a a > b a b a - b a b b - a b a if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        } sub % 2 == 1 sub % 2 sub 2 1 {
            System.out.println("IMPOSSIBLE");
            return;
        } System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" return; int k = sub / 2 + (a > b ? b : a); k sub / 2 + (a > b ? b : a) sub / 2 sub 2 (a > b ? b : a) a > b a b b a System.out.println(String.format("%d", k)) System.out.println System.out System System.out String.format("%d", k) String.format String "%d" k int a a int b b public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        calculation(a, b);
    }

    public static void calculation(int a, int b) {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        calculation(a, b);
    }

    public static void calculation(int a, int b) {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    }
} Main
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        calculation(a, b);
    }

    public static void calculation(int a, int b) {
        int sub = a > b ? a - b : b - a;
        if (sub % 2 == 1) {
            System.out.println("IMPOSSIBLE");
            return;
        }
        int k = sub / 2 + (a > b ? b : a);
        System.out.println(String.format("%d", k));
    }
}
