import java.util.Scanner;

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

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            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);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int n = Math.abs(A - B); n Math.abs(A - B) Math.abs Math A - B A B if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        } n % 2 == 0 n % 2 n 2 0 {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            } A < B A B {
                System.out.println(B - n / 2);
            } System.out.println(B - n / 2) System.out.println System.out System System.out B - n / 2 B n / 2 n 2 {
                System.out.println(A - n / 2);
            } System.out.println(A - n / 2) System.out.println System.out System System.out A - n / 2 A n / 2 n 2 {
            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);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
} Main
import java.util.Scanner;

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

        int n = Math.abs(A - B);
        if (n % 2 == 0) {
            if (A < B) {
                System.out.println(B - n / 2);
            } else {
                System.out.println(A - n / 2);
            }
        } else {
            System.out.println("IMPOSSIBLE");
        }
    }
}
