import java.util.*;
public class Main {

	public static void main(String[] args) {
		//long startTimeMilliSecond = System.currentTimeMillis();
		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) {
			for(;;) {
			c = Math.abs(A-K);
			d = Math.abs(B-K);
			if(c == d) {
				System.out.println(K);
				break;
				
			}
			K++;
		}
			
		}
		else if(A%2!=0 && B%2!=0) {
			for(;;) {
				c = Math.abs(A-K);
				d = Math.abs(B-K);
				if(c == d) {
					System.out.println(K);
					break;
					
				}
				K++;
			}
			
		}
		else {
			System.out.println("IMPOSSIBLE");
		}
		
		/*if(A != B) {
			//for(;;) {
				//c = Math.abs(A-K);
				//d = Math.abs(B-K);
				//if(c == d) {
					//System.out.println(K);
					//break;
					
				//}
				//K++;
			}
		}
		else if( A%2 != B%2) {
			System.out.println("IMPOSSIBLE");
		}*/
		
		//for(;;) {
			//long c = Math.abs(A-K);
			//long d = Math.abs(B-K);
			//if(c == d) {
				//System.out.println(K);
				
			//}
			//else {
				//System.out.println("zzzzzz");
				//break;
			//}
			//K++;
			
		//}
		//long endTimeMilliSecond = System.currentTimeMillis();
		 //System.out.println("Time Taken in "+(endTimeMilliSecond - startTimeMilliSecond) + " ms");

	}

}
