import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {
	private static final int MOD = 1_000_000_007;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	public static class Pair {
		private int index;
		private int value;

		public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		}

		public int getIndex() {
			return index;
		}

		public int getValue() {
			return value;
		}

		@Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		}
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	private static long gcd(long m, long n) {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	}

	private static long lcm(long m, long n) {
		return m / gcd(m, n) * n;
	}

	private static int add(int a, int b) {
		return (a + b) % MOD;
	}

	private static int sub(int a, int b) {
		return (a - b % MOD) % MOD;
	}

	private static int mul(int a, int b) {
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public char nextChar() throws IOException {
			return (char) skip();
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.util.Arrays; Arrays java.util public class Main {
	private static final int MOD = 1_000_000_007;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	public static class Pair {
		private int index;
		private int value;

		public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		}

		public int getIndex() {
			return index;
		}

		public int getValue() {
			return value;
		}

		@Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		}
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	private static long gcd(long m, long n) {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	}

	private static long lcm(long m, long n) {
		return m / gcd(m, n) * n;
	}

	private static int add(int a, int b) {
		return (a + b) % MOD;
	}

	private static int sub(int a, int b) {
		return (a - b % MOD) % MOD;
	}

	private static int mul(int a, int b) {
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public char nextChar() throws IOException {
			return (char) skip();
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} Main private static final int MOD = 1_000_000_007; MOD 1_000_000_007 private static boolean isDebug = System.getProperty("sun.desktop") != null; isDebug System.getProperty("sun.desktop") != null System.getProperty("sun.desktop") System.getProperty System "sun.desktop" null public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long A = sc.nextLong(); A sc.nextLong() sc.nextLong sc long B = sc.nextLong(); B sc.nextLong() sc.nextLong sc if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		} A == B || A == -B A == B A B A == -B A -B B {
			System.out.println(0);
		} System.out.println(0) System.out.println System.out System System.out 0 if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		} (A + B) % 2 == 0 (A + B) % 2 (A + B) A B 2 0 {
			System.out.println((A + B) / 2);
		} System.out.println((A + B) / 2) System.out.println System.out System System.out (A + B) / 2 (A + B) A B 2 {
			System.out.println("IMPOSSIBLE");
		} System.out.println("IMPOSSIBLE") System.out.println System.out System System.out "IMPOSSIBLE" String[] args args private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	} debug {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	} if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		} isDebug {
			System.err.println(Arrays.deepToString(o));
		} System.err.println(Arrays.deepToString(o)) System.err.println System.err System System.err Arrays.deepToString(o) Arrays.deepToString Arrays o Object... o o private static long gcd(long m, long n) {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	} gcd {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	} long temp; temp while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		} m % n != 0 m % n m n 0 {
			temp = n;
			n = m % n;
			m = temp;
		} temp = n temp n n = m % n n m % n m n m = temp m temp return n; n long m m long n n private static long lcm(long m, long n) {
		return m / gcd(m, n) * n;
	} lcm {
		return m / gcd(m, n) * n;
	} return m / gcd(m, n) * n; m / gcd(m, n) * n m / gcd(m, n) m gcd(m, n) gcd m n n long m m long n n private static int add(int a, int b) {
		return (a + b) % MOD;
	} add {
		return (a + b) % MOD;
	} return (a + b) % MOD; (a + b) % MOD (a + b) a b MOD int a a int b b private static int sub(int a, int b) {
		return (a - b % MOD) % MOD;
	} sub {
		return (a - b % MOD) % MOD;
	} return (a - b % MOD) % MOD; (a - b % MOD) % MOD (a - b % MOD) a b % MOD b MOD MOD int a a int b b private static int mul(int a, int b) {
		return ((a % MOD) * (b % MOD)) % MOD;
	} mul {
		return ((a % MOD) * (b % MOD)) % MOD;
	} return ((a % MOD) * (b % MOD)) % MOD; ((a % MOD) * (b % MOD)) % MOD ((a % MOD) * (b % MOD)) (a % MOD) a MOD (b % MOD) b MOD MOD int a a int b b public static class Pair {
		private int index;
		private int value;

		public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		}

		public int getIndex() {
			return index;
		}

		public int getValue() {
			return value;
		}

		@Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		}
	} Pair private int index; index private int value; value public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		} Pair {
			super();
			this.index = index;
			this.value = value;
		} super() super this.index = index this.index this this.index index this.value = value this.value this this.value value int index index int value value public int getIndex() {
			return index;
		} getIndex {
			return index;
		} return index; index public int getValue() {
			return value;
		} getValue {
			return value;
		} return value; value @Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		} toString {
			return "[" + index + ":" + value + "]";
		} return "[" + index + ":" + value + "]"; "[" + index + ":" + value + "]" value ":" "[" + index + ":" + value + "]" "[" index ":" value "]" public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public char nextChar() throws IOException {
			return (char) skip();
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	} Scanner private BufferedInputStream inputStream; inputStream public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		} Scanner {
			inputStream = new BufferedInputStream(in);
		} inputStream = new BufferedInputStream(in) inputStream new BufferedInputStream(in) InputStream in in public char nextChar() throws IOException {
			return (char) skip();
		} nextChar {
			return (char) skip();
		} return (char) skip(); (char) skip() skip public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} nextInt {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} int num = 0; num 0 int read = skip(); read skip() skip do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20); (read = inputStream.read()) > 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 {
				num = num * 10 + (read - 0x30);
			} num = num * 10 + (read - 0x30) num num * 10 + (read - 0x30) num * 10 num 10 (read - 0x30) read 0x30 return num; num public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		} fill {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		} for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextInt();
			} {
				a[i] = nextInt();
			} a[i] = nextInt() a[i] a i nextInt() nextInt int[] a a public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		} fill {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		} if (a.length != b.length) {
				throw new IllegalArgumentException();
			} a.length != b.length a.length a a.length b.length b b.length {
				throw new IllegalArgumentException();
			} throw new IllegalArgumentException(); new IllegalArgumentException() for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextInt();
				b[i] = nextInt();
			} {
				a[i] = nextInt();
				b[i] = nextInt();
			} a[i] = nextInt() a[i] a i nextInt() nextInt b[i] = nextInt() b[i] b i nextInt() nextInt int[] a a int[] b b public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} nextLong {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} long num = 0; num 0 int read = skip(); read skip() skip do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20); (read = inputStream.read()) > 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 {
				num = num * 10 + (read - 0x30);
			} num = num * 10 + (read - 0x30) num num * 10 + (read - 0x30) num * 10 num 10 (read - 0x30) read 0x30 return num; num public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		} fill {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		} for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextLong();
			} {
				a[i] = nextLong();
			} a[i] = nextLong() a[i] a i nextLong() nextLong long[] a a public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		} fill {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		} if (a.length != b.length) {
				throw new IllegalArgumentException();
			} a.length != b.length a.length a a.length b.length b b.length {
				throw new IllegalArgumentException();
			} throw new IllegalArgumentException(); new IllegalArgumentException() for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextLong();
				b[i] = nextLong();
			} {
				a[i] = nextLong();
				b[i] = nextLong();
			} a[i] = nextLong() a[i] a i nextLong() nextLong b[i] = nextLong() b[i] b i nextLong() nextLong long[] a a long[] b b public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		} nextLong {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		} long[] array = new long[n]; array new long[n] n for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				array[i] = nextLong();
			} {
				array[i] = nextLong();
			} array[i] = nextLong() array[i] array i nextLong() nextLong return array; array int n n public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		} next {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		} StringBuilder builder = new StringBuilder(); builder new StringBuilder() int read = skip(); read skip() skip do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20); (read = inputStream.read()) > 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 {
				builder.append((char) read);
			} builder.append((char) read) builder.append builder (char) read return builder.toString(); builder.toString() builder.toString builder private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		} skip {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		} int read; read while ((read = inputStream.read()) <= 0x20)
				; (read = inputStream.read()) <= 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 return read; read public class Main {
	private static final int MOD = 1_000_000_007;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	public static class Pair {
		private int index;
		private int value;

		public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		}

		public int getIndex() {
			return index;
		}

		public int getValue() {
			return value;
		}

		@Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		}
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	private static long gcd(long m, long n) {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	}

	private static long lcm(long m, long n) {
		return m / gcd(m, n) * n;
	}

	private static int add(int a, int b) {
		return (a + b) % MOD;
	}

	private static int sub(int a, int b) {
		return (a - b % MOD) % MOD;
	}

	private static int mul(int a, int b) {
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public char nextChar() throws IOException {
			return (char) skip();
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} public class Main {
	private static final int MOD = 1_000_000_007;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	public static class Pair {
		private int index;
		private int value;

		public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		}

		public int getIndex() {
			return index;
		}

		public int getValue() {
			return value;
		}

		@Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		}
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	private static long gcd(long m, long n) {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	}

	private static long lcm(long m, long n) {
		return m / gcd(m, n) * n;
	}

	private static int add(int a, int b) {
		return (a + b) % MOD;
	}

	private static int sub(int a, int b) {
		return (a - b % MOD) % MOD;
	}

	private static int mul(int a, int b) {
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public char nextChar() throws IOException {
			return (char) skip();
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} Main
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {
	private static final int MOD = 1_000_000_007;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();

		if (A == B || A == -B) {
			System.out.println(0);
		} else if ((A + B) % 2 == 0) {
			System.out.println((A + B) / 2);
		} else {
			System.out.println("IMPOSSIBLE");
		}
	}

	public static class Pair {
		private int index;
		private int value;

		public Pair(int index, int value) {
			super();
			this.index = index;
			this.value = value;
		}

		public int getIndex() {
			return index;
		}

		public int getValue() {
			return value;
		}

		@Override
		public String toString() {
			return "[" + index + ":" + value + "]";
		}
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	private static long gcd(long m, long n) {
		long temp;
		while (m % n != 0) {
			temp = n;
			n = m % n;
			m = temp;
		}
		return n;
	}

	private static long lcm(long m, long n) {
		return m / gcd(m, n) * n;
	}

	private static int add(int a, int b) {
		return (a + b) % MOD;
	}

	private static int sub(int a, int b) {
		return (a - b % MOD) % MOD;
	}

	private static int mul(int a, int b) {
		return ((a % MOD) * (b % MOD)) % MOD;
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public char nextChar() throws IOException {
			return (char) skip();
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
}