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):
a,b=map(int,input().split())
if a%2!=b%2:
    print("IMPOSSIBLE")
else:
    print(abs(a-b)//2+min(a,b))

Solution (Python):

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

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

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

A = int(a)
B = int(b)

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

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

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

Solution (Python):
a,b=(int(x) for x in input().split())

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

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

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

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

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

Solution (Python):
A,B=map(int,input().split())
K=(A+B)/2
k=int(K)
print([k,"IMPOSSIBLE"][k!=K])

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

if X%2==1:
  print("IMPOSSIBLE")
else:
  print(str(X//2).strip("-"))

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

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

Solution (Python):
a=sum(map(int,input().split()));print(a%2*'IMPOSSIBLE'or a//2)

Solution (Python):

"""
Created on Mon Jul 29 01:57:09 2019

@author: matsui
"""


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

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

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

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

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

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

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

Solution (Python):
def solve():
  a,b = (int(i) for i in input().split())
  if (b-a)%2 != 0:
    print('IMPOSSIBLE')
  else:
    tmp = (b-a)//2
    print(b-tmp)
  
solve()

Solution (Python):
A,B = [int(i) for i in input().split()]

n = (A + B) / 2

if (float.is_integer(n)) :
    print(int(n))
else :
    print("IMPOSSIBLE")

Solution (Python):
a, b = (int(x) for x in input().split())
ans = int(a/2+b/2+0.5)
if abs(a-ans) == abs(b-ans):
    print(ans)
else:
    print("IMPOSSIBLE")

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

Solution (Python):

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


if (A + B) % 2 == 0:
  K = int((A + B) / 2)
  print("{}".format(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):
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]

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


if __name__ == "__main__":
    main()

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

Solution (Python):
def main36():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    if int(abs(num[0]-num[1])) % 2 == 1:
        print("IMPOSSIBLE")
        return
    result = int(abs(num[0] + num[1]) / 2)
    print(result)
 
if __name__ == "__main__":
    main36()

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

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

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

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

Solution (Python):
a, b = list(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 abs(abs(a) + abs(b))%2 == 0:
    print(abs(abs(a) + abs(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):
List = list(map(int,input().split())) 
List.sort()
K = List[1]-List[0]
if (K%2==0):
  print(List[0]+(K//2))
else:
  print("IMPOSSIBLE")

Solution (Python):
a, b=map(int,input().split())
if (a+b)%2==0 :
  k=(a+b)//2
  print(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())
if (a**2-b**2)%(2*(a-b))==0:
    print((a**2-b**2)//(2*(a-b)))
else:
    print("IMPOSSIBLE")

Solution (Python):
N = list(map(int, input().split()))
A = max(N) + min(N)

answer = 0
if A % 2 == 0:
  answer = int(A/2)
else:
  answer = "IMPOSSIBLE"
  
print(answer)

Solution (Python):
A,B=map(int,input().split())
if (A-B)%2==0:
    print(int((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=map(int,input().split())
if (A-B)%2==1:
    print("IMPOSSIBLE")
else:
  	print(int((A+B)/2))

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

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

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

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

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

Solution (Python):
a=list(map(int,input().split()))
x=(a[0]*a[0]-a[1]*a[1])/(2*a[0]-2*a[1])
if(x%1==0):
  print(int(x))
else:
  print('IMPOSSIBLE')

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

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


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
def main():
    A, B = [int(str) for str in input().split(' ')]

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

if __name__ == "__main__":
    main()

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 = "IMPOSSIBLE"

if A == B:
    ans = 0
elif abs(A + B) % 2 == 0:
    ans = abs(A + B) // 2

print(ans)

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):


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

mid = (a+b)/2

if mid.is_integer():
    print(int(mid))
else:
    print("IMPOSSIBLE")

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

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

Solution (Python):
def main():

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    class UnionFindTree:
        """union find tree class
        TODO: fix this description...
        how to use (example):
        >>  uf = UnionFindTree(N) 
        >>  if uf.find_root(a) == uf.find_root(b):
        >>      do something
        >>  else:
        >>      do something
        >>      uf.unite(a, b)
        """
        def __init__(self, N):
            self.root = [-1] * (N+1)
            self.rank   = [0]  * (N+1)
            self.connected_num = [1] * (N+1)
    
        def find_root(self,x):
            root = self.root
            while root[x] != -1:
                x = root[x]
            return x
    
        def unite(self,x,y):
            root = self.root
            rank = self.rank
            connected_num = self.connected_num
            find_root = self.find_root
    
            rx = find_root(x)
            ry = find_root(y)
            if rx != ry:
                if rank[rx] < rank[ry]:
                    root[rx] = ry
                    rx,ry = ry,rx
                else:
                    if rank[rx] == rank[ry]:
                        rank[rx] += 1
                    root[ry] = rx       
                connected_num[rx] += connected_num[ry]

    """ initialize variables and set inputs
    
        
        
    
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    if __name__ != '__main__':
        
        sys.stdin = open('sample.txt')
        
    
    

    A, B = R()
    if (A+B) % 2 != 0:
        print('IMPOSSIBLE')
    else:
        print((A+B)//2)
    
    
    

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """
    
    """memo: how to solve binary problems
    
    >>> a = 5
    >>> bin_str_a = format(a, '
    >>> print(bin_str_a)
    0b0101 
    """

if __name__ == '__main__':
    main()

Solution (Python):
import sys

def main():
    A, B = map(int, input().split())
    K = (A + B) / 2
    if K.is_integer():
        print(int(K))
    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())
K = (A + B) // 2
if abs(A - K) == abs(B - K):
    print(K)
else:
    print('IMPOSSIBLE')

Solution (Python):
A, B = map(int, input().split())
if (A + B) % 2 == 0:
    print(int((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 = list(map(int, input().split()))
if abs(A-B) % 2 == 1:
  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 == 0:
    print(int((A+B)/2))
else:
    print('IMPOSSIBLE')

Solution (Python):
a, b = [int(i) for i in raw_input().split()]

if abs(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):
num = list(map(int, input().split()))
A = num[0]
B = num[1]
if (A+B)%2 == 0:
    print(int((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):

"""
Created on Sun Jul 28 15:26:59 2019

@author: sp8783
"""

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

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

Solution (Python):
AB = list(map(int, input().split()))
 
A = int(AB[0])
B = int(AB[1])
 
if A%2 == 0 and B%2 == 0:
    print(int((A+B)/2))
elif A%2 == 1 and B%2 == 1:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")

Solution (Python):
str = input().split()
a = int(str[0])
b = int(str[1])
c = a + b
if c % 2:
	print('IMPOSSIBLE')
else:
	print(round((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())
c = a + b
if c % 2:
    print('IMPOSSIBLE')
else:
    print(int(c / 2))

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(" "))
if (max(a,b) - min(a,b)) % 2 != 0:
    print("IMPOSSIBLE")
else:
    print((a+b) // 2)

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

k = 0
cleared = True
if abs(b-a) % 2 == 0:
    if a < b:
        k = a + abs(b-a)//2
    else:
        k = b + abs(b-a)//2
else:
    cleared = False

if cleared:
    print(k)
else:
    print('IMPOSSIBLE')

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

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

Solution (Python):





A,B = map(int, input().split())
if abs(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());print("IMPOSSIBLE"if(a+b)%2else int((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())
c="IMPOSSIBLE" if (a+b)%2==1 else int((a+b)/2)
print(c)

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)/2
d = c%1
if d == 0:
    print(int(c))
else:
    print("IMPOSSIBLE")

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

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

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

L = A + B
if L % 2 == 0:
  print(int((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 A<0 or B<0 or B >10**9 or A > 10**9 or A==B:
	print ('Illegal')
else:
	if (A-B)%2!=0:
		print ('IMPOSSIBLE')
	else:
		print(int((A+B)/2))

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

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

Solution (Python):
list_input = input().split(" ")
A = int(list_input[0])
B = int(list_input[1])
K = (A+B)/2
if K == int(K):
  print(int(K))
else:
  print('IMPOSSIBLE')

Solution (Python):
def solve(a, b):
    k = (a + b) // 2
    return k if abs(a-k) == abs(b-k) else "IMPOSSIBLE"

a, b = map(int, input().split())
print(solve(a, b))

Solution (Python):


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

Solution (Python):
a,b = map(int,input().split())
if (a%2==0 and b%2==0) or (a%2==1 and b%2==1):
    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):
import sys

for l in sys.stdin:
    A, B = map(int, l.split())
    if (A + B) % 2 == 0:
        print(int((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):
x,y = map(int,input().split())
if (x + y) % 2 == 1:
  print("IMPOSSIBLE")
else:
  c = (x + y) /2
  print(int(c))

Solution (Python):
a, b = map(int,input().split())
x = (a+b)%2
if x == 0:
    print((a+b)//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):
a,b=map(int,input().split())
k=(a+b)/2
if k%1==0:
    print(int(k))
else:
    print("IMPOSSIBLE")

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

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

Solution (Python):
def main():
  a, b = map(int, input().split())
  c  = abs((b+a)/2)
  if c.is_integer() == True:
    print(int(c))
  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):
a,b = (int(i) for i in input().split())
if (a+b)%2: print("IMPOSSIBLE")
else: print((a+b)//2)

Solution (Python):
class ABC135:
    def __init__(self):
        pass

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

if __name__ == '__main__':
    A, B = map(int, input().split())
    problem = ABC135()
    problem.solve(A, B)

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

Solution (Python):


i = list(map(int, input().split()))

A = i[0]
B = i[1]
K = (A+B)/2

if(K.is_integer() == True):
    print(int(K))
else:
    print("IMPOSSIBLE")

Solution (Python):
def result(m, n):
    average = (m+n)/2
    if int(average)==average:
        return int(average)
                
m, n = input().split(" ")
m = (int(m))
n = (int(n))
res = result(m, n) 
if res == None:
    print("IMPOSSIBLE")
else:
    print(res)

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())
val=(a+b)//2
if(val*2==a+b):
  print(val)
else:
  print("IMPOSSIBLE")

Solution (Python):
a, b = map(int, input().split(" "))
if (-a - b) % 2 == 0:
    print(abs((-b - a) // 2))
elif (a + b) % 2 == 0:
    print(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())
k = (A+B)//2 
if (A+B)%2 == 0:
  print(k)
else:
  print("IMPOSSIBLE")

Solution (Python):
import math


a, b = [int(i) for i in input().split()]







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

Solution (Python):
import sys
input = sys.stdin.readline
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] = map(lambda x: int(x), input().split(" "))
K = (A + B) / 2

if K.is_integer():
    print(int(K))
else:
    print("IMPOSSIBLE")

Solution (Python):
a,b = map(int, input().split(" "))
x = (a + b)/2
if(int(x) == x):
    print(int(x))
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((a+b)%2==1):
    print("IMPOSSIBLE")
else:
    print((a+b)//2)

Solution (Python):
_l = input().split()
_s = sum([int(i) for i in _l])
if _s % 2 != 0:
    print('IMPOSSIBLE')
else:
    print(int(_s / 2))

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

Solution (Python):
x=sum(list(map(int,input().split())))
x=int(x/2) if not x%2 else 'IMPOSSIBLE'
print(x)

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

Solution (Python):
import math
a, b = map(int, input().split())
print("IMPOSSIBLE" if abs(a-b)%2 == 1 else min(a,b)+abs(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 = [int(i) for i in input().split()]
if (a+b) % 2 == 1: print("IMPOSSIBLE")
else: print(str(int((a+b)/2)))

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

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

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

print(ans)

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

a, b = wi()
if (a + b) / 2 == int((a + b) / 2):
    print(int((a + b) / 2))
else:
    print("IMPOSSIBLE")

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

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

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())
if abs(A-B)%2==0:
    print((max(A,B)+min(A,B))//2)
else:
    print("IMPOSSIBLE")

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

Solution (Python):
a=eval(input().replace(' ','+'));print(a%2*'IMPOSSIBLE'or a//2)

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

Solution (Python):
a=eval(input().replace(' ','+'));print(a%2*'IMPOSSIBLE'or a//2)

Solution (Python):
import sys

raw_input = sys.stdin.readline

f = lambda : raw_input().rstrip()    
f1 = lambda : f().split()
f2 = lambda t: map(t,f1())

def main1():
    a,b = f2(int)
    if (a+b)%2 == 0:
       print (a+b)/2
    elif a == b:
       print 0
    else:
       print "IMPOSSIBLE"

def main2():
    n = int(f)
    a = f2(int)
    b = sorted(a)
    m = 0
    for i in xrange(n):
        if a[i] != b[i]:
            m = m + 1
    if m<2:
        print "YES"
    else:
        print "NO"

def main3():
    n = int(f())
    a = f2(int)
    b = f2(int)
    ans = 0
    for k in xrange(n):
        if a[i] >= b[i]:
            ans = ans + b[i]
        elif a[i] < b[i] :
            ans = ans + a[i]
            b[i] = b[i] - a[i]
            ans = ans + min(a[i+1], b[i])
            a[i+1] = a[i+1] - b[i]  
    print ans 
 
def main4():
    pass
    
    
if __name__ == "__main__":
    main1()

Solution (Python):
A, B = map(int, input().split())
K = A + B
if K % 2 == 0:
  print(K // 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:
  a,b=b,a

k=(a+b)/2
if k%1==0 and b<k<a:
  print(int(k))
else:
  print("IMPOSSIBLE")

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

Solution (Python):
x,y = map(int,input().split())

if (x+y)%2==0:
    print((x+y)//2)
else:
    print("IMPOSSIBLE")

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

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