import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	} main {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int seisuA = scan.nextInt(); seisuA scan.nextInt() scan.nextInt scan int  seisuB = scan.nextInt(); seisuB scan.nextInt() scan.nextInt scan boolean flg = false; flg false int re = 0; re 0 for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		} int k=0; int k=0; k 0 k<Math.max(seisuA, seisuB) k Math.max(seisuA, seisuB) Math.max Math seisuA seisuB k++ k++ k {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		} {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		} if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			} Math.abs(seisuA-k) == Math.abs(seisuB-k) Math.abs(seisuA-k) Math.abs Math seisuA-k seisuA k Math.abs(seisuB-k) Math.abs Math seisuB-k seisuB k {
				re = k;
				flg = true;
				break;
			} re = k re k flg = true flg true break; System.out.println(flg?re:"IMPOSSIBLE") System.out.println System.out System System.out flg?re:"IMPOSSIBLE" flg re "IMPOSSIBLE" scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int seisuA = scan.nextInt();
		int  seisuB = scan.nextInt();
		boolean flg = false;
		int re = 0;

		for(int k=0;k<Math.max(seisuA, seisuB);k++) {

			if(Math.abs(seisuA-k) == Math.abs(seisuB-k)){
				re = k;
				flg = true;
				break;
			}
		}
		System.out.println(flg?re:"IMPOSSIBLE");
		scan.close();

	}

}
