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();
		int c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	}
} 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();
		int c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	} main {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	} 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 c = 0; c 0 if(a >= b) {
			c = a;
		}else {
			c = b;
		} a >= b a b {
			c = a;
		} c = a c a {
			c = b;
		} c = b c b int k = 0; k 0 for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		} int i = 0; int i = 0; i 0 i < c i c i++ i++ i {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		} {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		} if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			} Math.abs(a - i) == Math.abs(b - i) Math.abs(a - i) Math.abs Math a - i a i Math.abs(b - i) Math.abs Math b - i b i {
				k = i;
			} k = i k i if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		} k == 0 k 0 {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" {
			System.out.println(k);
		} System.out.println(k) System.out.println System.out System System.out k 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 c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	}
} public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	}
} 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();
		int c = 0;
		if(a >= b) {
			c = a;
		}else {
			c = b;
		}
		int k = 0;
		
		for(int i = 0; i < c; i++) {
			if(Math.abs(a - i) == Math.abs(b - i)){
				k = i;
			}
		}
		if(k == 0) {
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println(k);
		}
	}
}