import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x = Math.max(a,b);
        int ans = 0;
        for (int i = x; 0 < i; i--) {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        }
        if (ans == 0) {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x = Math.max(a,b);
        int ans = 0;
        for (int i = x; 0 < i; i--) {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        }
        if (ans == 0) {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x = Math.max(a,b);
        int ans = 0;
        for (int i = x; 0 < i; i--) {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        }
        if (ans == 0) {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x = Math.max(a,b);
        int ans = 0;
        for (int i = x; 0 < i; i--) {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        }
        if (ans == 0) {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        }
        System.out.println(ans);
    } 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 x = Math.max(a,b); x Math.max(a,b) Math.max Math a b int ans = 0; ans 0 for (int i = x; 0 < i; i--) {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        } int i = x; int i = x; i x 0 < i 0 i i-- i-- i {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        } {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        } int y = a - i; y a - i a i int z = b - i; z b - i b i if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            } Math.abs(y) == Math.abs(z) Math.abs(y) Math.abs Math y Math.abs(z) Math.abs Math z {
                ans = i;
                break;
            } ans = i ans i break; if (ans == 0) {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        } ans == 0 ans 0 {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        } System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" System.exit(0) System.exit System 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int x = Math.max(a,b);
        int ans = 0;
        for (int i = x; 0 < i; i--) {
            int y = a - i;
            int z = b - i;
            if (Math.abs(y) == Math.abs(z)) {
                ans = i;
                break;
            }
        }
        if (ans == 0) {
            System.out.println("IMPOSSIBLE");
            System.exit(0);
        }
        System.out.println(ans);
    }
}