import java.util.*;
import java.lang.Math.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	}
} import java.util.*; util.* java import java.lang.Math.*; Math.* java.lang public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	} 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 distance = Math.abs(A-B); distance Math.abs(A-B) Math.abs Math A-B A B int harfDistance = distance / 2; harfDistance distance / 2 distance 2 int left = Math.max(A, B) - harfDistance; left Math.max(A, B) - harfDistance Math.max(A, B) Math.max Math A B harfDistance int right = Math.min(A, B) + harfDistance; right Math.min(A, B) + harfDistance Math.min(A, B) Math.min Math A B harfDistance if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		} left == right left right {
			System.out.println(left);
		} System.out.println(left) System.out.println System.out System System.out left {
			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 = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	}
} Main
import java.util.*;
import java.lang.Math.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		// スペース区切りの整数の入力
		int B = sc.nextInt();

		int distance = Math.abs(A-B);
		int harfDistance = distance / 2;

		int left = Math.max(A, B) - harfDistance;
		int right = Math.min(A, B) + harfDistance;

		if(left == right){
			System.out.println(left);
		}else{
			System.out.println("IMPOSSIBLE");
		}
	}
}