import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner x = new Scanner(System.in);
		long A = x.nextLong();
		long B = x.nextLong();
		long K=0,c=0,d=0;
		
		if(A%2 == B%2) {
			System.out.println((A+B)/2);
		}
			
		
		else if(A%2!=0 && B%2!=0) {
			System.out.println((A+B)/2);
		
			
		}
		else {
			System.out.println("IMPOSSIBLE");
		}
	}

}
