import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	}
} import java.io.IOException; IOException java.io import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	}
} Main public static void main(String[] args) throws IOException {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	} main {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	} Scanner sn = new Scanner(System.in); sn new Scanner(System.in) String[] AB = sn.nextLine().split(" "); AB sn.nextLine().split(" ") sn.nextLine().split sn.nextLine() sn.nextLine sn " " int A = Integer.parseInt(AB[0]); A Integer.parseInt(AB[0]) Integer.parseInt Integer AB[0] AB 0 int B = Integer.parseInt(AB[1]); B Integer.parseInt(AB[1]) Integer.parseInt Integer AB[1] AB 1 int x = ((B - A) / 2); x ((B - A) / 2) (B - A) B A 2 int A1 = A - x; A1 A - x A x int A2 = A + x; A2 A + x A x int B1 = B - x; B1 B - x B x int B2 = B + x; B2 B + x B x if (A1 == B1) {
			System.out.println(A1);
			return;
		} A1 == B1 A1 B1 {
			System.out.println(A1);
			return;
		} System.out.println(A1) System.out.println System.out System System.out A1 return; if (A1 == B2) {
			System.out.println(A1);
			return;
		} A1 == B2 A1 B2 {
			System.out.println(A1);
			return;
		} System.out.println(A1) System.out.println System.out System System.out A1 return; if (A2 == B1) {
			System.out.println(A2);
			return;
		} A2 == B1 A2 B1 {
			System.out.println(A2);
			return;
		} System.out.println(A2) System.out.println System.out System System.out A2 return; if (A2 == B2) {
			System.out.println(A2);
			return;
		} A2 == B2 A2 B2 {
			System.out.println(A2);
			return;
		} System.out.println(A2) System.out.println System.out System System.out A2 return; System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	}
} Main
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sn = new Scanner(System.in);

		String[] AB = sn.nextLine().split(" ");
		int A = Integer.parseInt(AB[0]);
		int B = Integer.parseInt(AB[1]);
		
		int x = ((B - A) / 2);
		
		int A1 = A - x;
		int A2 = A + x;
		int B1 = B - x;
		int B2 = B + x;

		if (A1 == B1) {
			System.out.println(A1);
			return;
		}
		if (A1 == B2) {
			System.out.println(A1);
			return;
		}
		if (A2 == B1) {
			System.out.println(A2);
			return;
		}
		if (A2 == B2) {
			System.out.println(A2);
			return;
		}

		System.out.println("IMPOSSIBLE");
	}
}