
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"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 = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE");
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc cnt=0; cnt 0 for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		} ; cnt<Math.max(a, b) cnt Math.max(a, b) Math.max Math a b cnt++ cnt++ cnt {
			if(a+b-(cnt*2) == 0)break;
		} {
			if(a+b-(cnt*2) == 0)break;
		} if(a+b-(cnt*2) == 0)break; a+b-(cnt*2) == 0 a+b-(cnt*2) a+b a b (cnt*2) cnt 2 0 break; System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE") System.out.println System.out System System.out cnt<Math.max(a, b)?cnt:"IMPOSSIBLE" cnt<Math.max(a, b) cnt Math.max(a, b) Math.max Math a b cnt "IMPOSSIBLE" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE");
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(),b = sc.nextInt(),cnt=0;
		for(; cnt<Math.max(a, b); cnt++) {
			if(a+b-(cnt*2) == 0)break;
		}
		System.out.println(cnt<Math.max(a, b)?cnt:"IMPOSSIBLE");
	}
}
