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();

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

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

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

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

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

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

        if (Math.abs(a - b) % 2 != 0) {
            System.out.println("IMPOSSIBLE");
        } else {
            int tmp = Math.abs(a - b) / 2;
            if (a < b) {
                System.out.println(a + tmp);
            } else {
                System.out.println(b + tmp);
            }
        }
    }
}
