Problem:
 Score: 100 points    Problem Statement We have two distinct integers A and B .  Print the integer K such that |A - K| = |B - K| .  If such an integer does not exist, print IMPOSSIBLE instead.      Constraints  All values in input are integers.  0 \leq A,\ B \leq 10^9  A and B are distinct.         Input Input is given from Standard Input in the following format:  A  B       Output Print the integer K satisfying the condition.  If such an integer does not exist, print IMPOSSIBLE instead.        Sample Input 1 2 16      Sample Output 1 9  |2 - 9| = 7 and |16 - 9| = 7 , so 9 satisfies the condition.       Sample Input 2 0 3      Sample Output 2 IMPOSSIBLE  No integer satisfies the condition.       Sample Input 3 998244353 99824435      Sample Output 3 549034394

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    a, b = map(int, input().split())
    k = ((a + b) / 2)

    if k == int(k):
        print(int(k))
    else:
        print("IMPOSSIBLE")




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
A,B = [int(i) for i in input().split()]
if (A + B) % 2 == 0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    if (A + B) % 2 != 0:
        return 'IMPOSSIBLE'
    return (A + B) // 2


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int, input().split())
ans = (a+b)//2
if(ans * 2 != a+b):
    print("IMPOSSIBLE")
else:
    print(ans)

Solution (Python):
a, b = map(int, input().split())
c = a + b
if c % 2 == 0:
    print(c // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
if (A - B ) % 2 == 0:
    print((A+B)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
if (a+b)%2 == 1:
    print('IMPOSSIBLE')
else:
    print(int((a+b)/2))

Solution (Python):
[a,b] = [int(i) for i in input().split()]
if (a-b) % 2 == 0:
    print(min(a,b) + int(abs(b-a)/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int,input().split())
if ( a + b ) % 2 == 0:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
inf = 10 ** 18
P = 10 ** 9 + 7

A, B = map(int, input().split())

ans = (A + B) // 2

if abs(A - ans) == abs(B - ans):
    print(ans)
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())

K = (A + B) / 2

if int(K) == K:
    print(int(K))
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

print((A + B) // 2 if (A + B) % 2 == 0 else 'IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())

ans = (
    (A + B) // 2 if (A + B) % 2 == 0 else
    'IMPOSSIBLE'
)

print(ans)

Solution (Python):
from copy import *
from sys import *
import math
import queue
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)

def main():
	a,b = map(int,input().split())
	if((a+b)%2==0):
		print((a+b)//2)
	else:
		print('IMPOSSIBLE')

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(m,n):
	x = max(m,n)
	y = min(m,n)
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	return y

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
A, B = map(int, input().split())
K = (A+B)//2
if abs(A-K) == abs(B-K):
    print(K)
else:
    print('IMPOSSIBLE')

Solution (Python):
a, b = sorted(map(int, input().split()))
print((a + b) // 2 if (b - a) & 1 == 0 else "IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
if((a + b) % 2 == 1):
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)

Solution (Python):



a,b=map(int,input().split(" "))

if((b+a)%2==0):
	print((a+b)//2)
else:
	print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())
if (A + B) % 2 == 1:
    print('IMPOSSIBLE')
else:
    print((A+B)//2)

Solution (Python):
from heapq import heappush, heappop
import re
from collections import deque
import sys
import math
input = sys.stdin.readline


def int_raw():
    return int(input())


def ss_raw():
    return input().split()


def ints_raw():
    return tuple(map(int, ss_raw()))


DIV = 10**9+7


def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def ncr(n, r, mod=DIV):
	r = min(r, n-r)
	ret = 1
	for i in range(1, r+1):
		ret = ret * (n-i+1) % mod
		ret = ret * mod_inv(i, mod) % mod
	return ret


def main():
    A,B = ints_raw()
    if abs(A-B)%2==1:
        return "IMPOSSIBLE"
    else:
        return (A+B)//2

print(main())

Solution (Python):
a,b=map(int,input().split())
if (a-b)%2==1:
    print('IMPOSSIBLE')
else:
    print((a+b)//2)

Solution (Python):
a,b= [int(s) for s in input().split()]
if((a+b)%2==0):
  print((a+b)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
A,B = [int(x) for x in input().split()]
if((A+B)%2!=0):
    print('IMPOSSIBLE')
else:
    print((A+B)//2)

Solution (Python):
a,b = map(int, input().split())

if (a-b)%2!=0:
    print('IMPOSSIBLE')
else:
    print((a+b)//2)

Solution (Python):
a, b = map(int, input().split())

k = (a + b) // 2

if abs(a - k) == abs(b - k):
    print(k)
else:
    print("IMPOSSIBLE")

Solution (Python):
import sys
input=sys.stdin.readline
a,b=map(int,input().split())
if a%2==b%2:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
a, b = map(int, input().split())
if abs(b - a) % 2:
    print('IMPOSSIBLE')
else:
    print(abs(b - a) // 2 + min(a, b))

Solution (Python):
A, B = map(int, input().split())
if abs(A - B) % 2 != 0:
    print('IMPOSSIBLE')
else:
    print(min(A, B) + abs(A - B) // 2)

Solution (Python):
a,b=map(int,input().split())
if (a+b)%2==1:print("IMPOSSIBLE")
else:print((a+b)//2)

Solution (Python):
a, b = map(int, input().split())
print("IMPOSSIBLE" if (a+b)%2 else str((a+b)//2))

Solution (Python):
A, B = map(int, input().split())
if abs(B - A) % 2 == 0:
    print((A + B) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b=map(int,input().split())
if (a+b)%2==0:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = map(int, input().split())

if abs(A - B) % 2 == 0:
    print(min(A, B) + abs(A - B) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())

if (a+b)%2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())

C = A+B
if C % 2:
    print('IMPOSSIBLE')
else:
    print(C//2)

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
Max = sys.maxsize
def l(): 
	return list(map(int,input().split()))
def m(): 
	return map(int,input().split())
def onem(): 
	return int(input())
def s(x): 
	a = []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): 
	return " ".join(map(str,x))
def max2(x): 
	return max(map(max,x))

n,m = m()

if (n+m)/2 == (n+m)//2:
	print((n+m)//2)
else:
	print("IMPOSSIBLE")

Solution (Python):
A,B=list(map(int,input().strip().split(' ')))
K=(A+B)//2
if abs(K-A)==abs(K-B):
    print(K)
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())

s = abs(b - a)

if s % 2 == 0:
  print(min(a, b) + s //2)
else:
  print('IMPOSSIBLE')

Solution (Python):
a, b = map(int, input().split())

if (a + b) % 2:
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)

Solution (Python):
n,m=map(int,input().split())
if (n+m)%2==0:
    print((n+m)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b = map(int, input().split())
c = a+b
if c%2 == 1:
    print('IMPOSSIBLE')
else:
    print(c//2)

Solution (Python):
A,B = map(int,input().split())
if (A+B) %2 == 0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

if (A+B)%2 == 0:
	print((A+B)//2)
else:
	print("IMPOSSIBLE")

Solution (Python):
A,B = map(int,input().split())
if ((A+B)/2)%1 == 0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
import math
a,b =  list(map(int,input().split(" ")))

if (a+ b) % 2 == 0:
    print((a+ b)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):

def main():
    a, b = tuple(map(int, input().rstrip().split()))
    print((a + b) // 2 if (a + b) % 2 == 0 else "IMPOSSIBLE")


if __name__ == "__main__":
    main()

Solution (Python):
a,b = map(int,input().split())
if (a+b)%2:
    print('IMPOSSIBLE')
else:
    print((a+b)//2)

Solution (Python):
a,b=map(int,input().split())
if((a+b)%2==0):
	print((a+b)//2)
else:
	print("IMPOSSIBLE")

Solution (Python):

a,b=map(int,input().split())
if (a-b)%2==1:
  print("IMPOSSIBLE")
else:
  print((a+b)//2)

Solution (Python):
A,B = map(int,input().split())
C = A + B
if C % 2:
    print("IMPOSSIBLE")
else:
    print(C//2)

Solution (Python):
a, b = map(int, input().split())

print("IMPOSSIBLE" if (a + b) % 2 else (a + b)//2)

Solution (Python):
a, b = map(int, input().split())
c = a + b
if c % 2 == 0:
    print(c // 2)
else:
    print('IMPOSSIBLE')

Solution (Python):
n, m = map(int, input().split())
if (n+m) % 2 == 0:
    print((n+m)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, raw_input().split())
if (a + b) % 2 == 1:
    print 'IMPOSSIBLE'
else:
    print (a + b) >> 1

Solution (Python):
A, B = map(int, input().split())
if (A+B)%2==0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())
if A > B:
    A, B = B, A
if (B - A) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print((B + A)//2)

Solution (Python):
A, B = map(int, input().split())
if (A+B)%2 == 1:
    print('IMPOSSIBLE')
else:
    print((A+B)//2)

Solution (Python):

import sys
INF = float("inf")


def no():
    print("IMPOSSIBLE")  


def solve(A: int, B: int):
    K = (A+B)//2
    if abs(A-K) == abs(B-K):
        print(K)
    else:
        no()

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)


if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int, input().split())
if abs(a-b)%2:
  print("IMPOSSIBLE")
else:
  print((a+b)//2)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    
    
    a, b = map(int, input().split())
    
    
    if (a+b)&1 == 1:
        print("IMPOSSIBLE")
    else:
        print((a+b)//2)

if __name__ == "__main__":
    main()

Solution (Python):
a, b = map(int, input().split())
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
n = input().split()
a, b = int(n[0]), int(n[1])
if (a+b)%2==0:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
n,m=[int(i) for i in input().split()]
if (n+m)%2==0:
  print((n+m)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
A, B = list(map(int, input().split()))

if (A + B) % 2:
    print("IMPOSSIBLE")
else:
    print((A + B) // 2)

Solution (Python):
A,B = map(int,input().split())
K = (A+B)//2
if abs(K-A)!=abs(K-B):
    K = "IMPOSSIBLE"
print(K)

Solution (Python):
a, b = map(int, input().split())
k = min(a,b) + abs(a-b)//2
if abs(k-a) == abs(k-b):
    print(k)
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())
if (a - b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
A, B = [int(x) for x in input().split()]
s = A + B
if s % 2 == 0:
    print(s // 2)
else:
    print('IMPOSSIBLE')

Solution (Python):

"""
AtCoder A
"""

import sys, math, random
import numpy as np








inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    A, B = list(map(int,input().split()))
    if (A+B)%2==0:
        print(int((A+B)/2))
    else:
        print("IMPOSSIBLE")



if __name__ == "__main__":
    main()

Solution (Python):
a,b = map(int,input().split())
if (a+b)%2 == 0:
  print((a+b)//2)
else:
  print("IMPOSSIBLE")

Solution (Python):
a,b = map(int,input().split())

if (a+b)%2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')

Solution (Python):
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""

def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
a,b  =ips()
if (a+b)%2:
    print("IMPOSSIBLE")
else:print((a+b)//2)

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

s = sum([int(i) for i in readline().split()])

if s%2: print("IMPOSSIBLE")
else: print(s//2)

Solution (Python):
A,B = (int(x) for x in input().split())

if (A-B)%2 == 1:
    print("IMPOSSIBLE")
else:
    print((A+B)//2)

Solution (Python):
a, b = map(int, input().split())
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split())

if abs(a - b) % 2 == 0:
    print(a + (b - a) // 2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b = map(int,input().split())
if (a+b)%2:
    print("IMPOSSIBLE")
else:
    print((a+b)//2)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math


a, b = getList()
if abs(a-b) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print((a+b) // 2)

Solution (Python):
A, B = [int(elem) for elem in input().split()]
print((A + B) // 2 if (B - A) % 2 == 0 else "IMPOSSIBLE")

Solution (Python):
a,b=map(int,input().split())
if((a+b)%2==0):
    print((a+b)//2)
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b = map(int,input().split())
if (a + b) % 2 == 1:
  print("IMPOSSIBLE")
else:
  print((a + b)//2)

Solution (Python):
A,B=map(int,input().split())
if (B-A)%2==1:
    print("IMPOSSIBLE")
else:
    print((A+B)//2)

Solution (Python):
A,B = map(int,input().split())
if (A-B)%2:
    print('IMPOSSIBLE')
else:
    print((A+B)//2)

Solution (Python):
a,b=map(int,input().split())
if (a+b)%2==1:print("IMPOSSIBLE")
else:print((a+b)//2)

Solution (Python):
A, B = map(int, input().split())
if (A+B)%2:
    print("IMPOSSIBLE")
else:
    print((A+B)//2)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    a,b = LI()
    if (a-b)%2 == 0:
        print((a+b)//2)
    else:
        print("IMPOSSIBLE")
    return


def B():
    n = I()

    return


def C():
    n = I()

    return


def D():
    n = I()

    return


def E():
    n = I()

    return


def F():
    n = I()

    return


if __name__ == "__main__":
    A()

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    
    a, b = map(int, input().split())
    a += b
    if a & 1:
        print("IMPOSSIBLE")
    else:
        print(a // 2)
    
    return 0

main()

Solution (Python):

import sys
sys.setrecursionlimit(300000)

NO = "IMPOSSIBLE"  

def solve(A: int, B: int):
    if (A + B) % 2 == 0:
        ret = (A + B) // 2
    else:
        ret = NO
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int,input().split())
if a % 2 == b % 2:
    print((a + b) // 2)
else:
    print('IMPOSSIBLE')