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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	static int calc(int a, int b) {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	}
} 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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	static int calc(int a, int b) {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	}
} 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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} 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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} 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 k = calc(a, b); k calc(a, b) calc a b if (k != -1) {
			System.out.println(k);
		} else {
			System.out.println("IMPOSSIBLE");
		} k != -1 k -1 1 {
			System.out.println(k);
		} System.out.println(k) System.out.println System.out System System.out k {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args static int calc(int a, int b) {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	} calc {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	} if (a - b == 0) {
			return a - b;
		} a - b == 0 a - b a b 0 {
			return a - b;
		} return a - b; a - b a b if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		} (a + b) % 2 == 0 (a + b) % 2 (a + b) a b 2 0 {
			return (a + b) / 2;
		} return (a + b) / 2; (a + b) / 2 (a + b) a b 2 return -1; -1 1 int a a int b b 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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	static int calc(int a, int b) {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	}
} 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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	static int calc(int a, int b) {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	}
} 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 k = calc(a, b);

		if (k != -1) {
			System.out.println(k);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	static int calc(int a, int b) {
		if (a - b == 0) {
			return a - b;
		}
		if ((a + b) % 2 == 0) {
			return (a + b) / 2;
		}
		return -1;
	}
}
