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

sa = max(a,b) - min(a,b)

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

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 







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

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

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

Solution (Python):
A, B = map(int,input().split())
print('IMPOSSIBLE' if (A+B)&1 else 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=list(map(int,input().split()))
if(a+b)%2==0:
	print(int((a+b)*0.5))
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 == (A+B)/2:
    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):
def resolve():
    a,b = map(int, input().split())
    if (a+b)%2 == 0:
        print((a+b)//2)
    else:
        print("IMPOSSIBLE")

resolve()

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

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

Solution (Python):

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

x = ((b - a) // 2) + a

if abs(a - x) == abs(b - x):
  print(x)
else:
  print('IMPOSSIBLE')

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
x = input().split()
a = int(x[0]) + int(x[1])
b = math.floor(a / 2)
if (a % 2) == 0:
  print(b)
else:
  print('IMPOSSIBLE')

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

Solution (Python):
a,b=map(int,input().split())
count = 0
num = 0
for i in range(int((a+b)/2)-5, int((a+b)/2)+5):
  if abs(a-i) == abs(b-i):
    count += 1
    num = i
if count > 0:
  print(num)
else:
  print("IMPOSSIBLE")

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

Solution (Python):
def main():
    A, B = map(int, input().split())
    d = max(A, B) - min(A, B)
    if d % 2 == 0:
        K = min(A, B) + d//2
        print(K)
    else:
        print("IMPOSSIBLE")
if __name__ == "__main__":
    main()

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

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==(A+B)//2:
	print((A+B)//2)
else:
	print("IMPOSSIBLE")

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

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

Solution (Python):



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


K = A + B


if K%2==0:
    K = K // 2
    print(K)
else:
    print("IMPOSSIBLE")

Solution (Python):




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


ans = int((a + b) / 2)
if ans != (a + b) / 2:
    ans = 'IMPOSSIBLE'


print(ans)

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((a+b)//2)
else:
    print('IMPOSSIBLE')

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

if __name__ == "__main__":
  resolve()

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((A+B)//2 if (A+B)&1==0 else 'IMPOSSIBLE')

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

Solution (Python):
N, K = map(int, input().split())

if (N + K) % 2 == 0:
    print((N + K) // 2)
else:
    print("IMPOSSIBLE")

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

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

resolve()

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

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

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

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

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

AB = abs(A-B)

print(min(A,B)+ AB//2 if AB%2 == 0 else "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:
  c = (a+b)//2
  print(c)
else:
  print('IMPOSSIBLE')

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

Solution (Python):
k=eval(input().replace(' ','+'));print(k//2 if k%2==0 else "IMPOSSIBLE")

Solution (Python):
k=eval(input().replace(' ','+'));print(k//2 if (k/2).is_integer() else "IMPOSSIBLE")

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())
print((a + b)//2 if (a + b) %2==0 else 'IMPOSSIBLE')

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
a, b = map(int, input().split())
if a > b and (a+b)%2 == 0:
    ans = (a+b)/2
    print(int(ans))

elif b > a and (a+b)%2 == 0:
    ans = (b+a)/2
    print(int(ans))
else:
    print('IMPOSSIBLE')

Solution (Python):
q, r = divmod(sum(map(int, input().split())), 2)
print('IMPOSSIBLE' if r else q)

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 = 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((a+b)//2 if (a+b)%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 == 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 accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()
print((A+B)//2 if (A+B)/2 % 1 == 0 else "IMPOSSIBLE")

Solution (Python):
i = list(map(int, input().split())) 
K = int((i[0]+i[1])/2)

if (i[0]+i[1])%2==0:
    print(K)
else:
    print("IMPOSSIBLE")

Solution (Python):


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

if (N % 2 == 0):
  print(int(N/2))
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+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())
print((A + B) // 2 if (A + B) % 2 == 0 else 'IMPOSSIBLE')

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = list(map(int, input().split()))
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""

A, B = map(int, input().split())
ans = 0
if (A % 2 == 0 and B % 2 == 0) or (A % 2 != 0 and B % 2 != 0):
    ans = (A + B) // 2

print(ans if ans != 0 else 'IMPOSSIBLE')

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

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

Solution (Python):
import numpy as np
def main():
    a, b = map(int, input().split())
    if (a - b) % 2 == 1:
        print("IMPOSSIBLE")
    else: print(int((a + b)/ 2))
if __name__ == "__main__":
    main()

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 = map(int, input().split())

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

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

Solution (Python):


import sys



















def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    a, b = mi()
    print('IMPOSSIBLE') if (a + b) % 2 == 1 else print((a + b) // 2)

if __name__ == "__main__":
    main()

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 (b-a)%2 == 1:
    print('IMPOSSIBLE')

else:
    print(int((b-a)/2 + a))

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

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('IMPOSSIBLE')
else:
  print(abs(A+B)//2)

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

Solution (Python):
A, B = map(int, input().split())
ans = (A+B)//2

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

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

Solution (Python):
icase=0
if icase==0:
    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==(a+b)/2: print((a+b)//2)
else: print('IMPOSSIBLE')

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

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

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


if (a[1]-a[0])%2==0:
    print(int((a[1]-a[0])/2+a[0]))
else:
    print("IMPOSSIBLE")

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

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

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

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

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

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, raw_input().split())
if (A+B)%2==1:
    print "IMPOSSIBLE"
else:
    print (A+B)/2

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

if (a % 2 + b % 2) % 2 == 1:
	print('IMPOSSIBLE')
else:
	print(min(a,b) + (max(a,b) - min(a,b)) // 2)

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

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

Solution (Python):
import sys


def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]

p2D = lambda x: print(*x, sep="\n")
p = lambda x: print(x)


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

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

Solution (Python):
A,B=[int(x) for x in input().rstrip().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('{:.0f}'.format((a+b)/2))
else:
  print('IMPOSSIBLE')

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

if abs(a+b)//2 == abs(a+b)/2:
  print(int(abs(a+b)/2))
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] = list(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())

X = min(A,B)
Y = max(A,B)

n = Y - X

if n%2 == 1:
  print("IMPOSSIBLE")
else:
  print(X+(n//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
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

A,B=nm()

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

Solution (Python):
import sys
input = sys.stdin.readline
import math
import collections
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

a,b=MI()
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 (a+b)%2 == 0 else "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+b)/2) % 1 == 0:
    print(int((a+b)/2))
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):
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())
if (a-b)%2:
    print('IMPOSSIBLE')
else:
    print((a+b)//2)

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

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

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

num = abs(a + b)
if num % 2 == 0:
    print(num // 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())
 
c = a + b
 
if c % 2:
    print("IMPOSSIBLE")
else:
    print(c // 2)

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

Solution (Python):
def q1():
    A, B = (int(i) for i in input().split())
    d,m = divmod(A+B, 2)
    if m == 1:
        print('IMPOSSIBLE')
    else:
        print(d)


if __name__ == '__main__':
    q1()

Solution (Python):
inputted = list(map(int, input().split()))
A = inputted[0]
B = inputted[1]

average = lambda a, b: (a + b) / 2

ave = average(A, B)
answer = int(ave) if ave.is_integer() else 'IMPOSSIBLE'

print(answer)

Solution (Python):
A, B = map(int, input().split())
Amod2 = A%2
Bmod2 = B%2
if (Amod2 == Bmod2):
    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 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())
if (a + b) % 2 == 0:
    print(int((a + b) / 2))
    exit()
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%2 == b%2:
    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 (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= input().split()
a, b= int(a),int(b)
eq= (a+b)//2
eq2=(a+b)%2
if eq2==0:
	print(eq)
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( int((A+B)/2) )
else:
    print('IMPOSSIBLE')

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

if abs(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( int((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 a%2 != b%2:
    print("IMPOSSIBLE")
    exit()
print((a**2-b**2)//((2*a)-(2*b)))

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):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    A, B = input_nums()
    if A == B:
        ans = 0
    else:
        if (A+B)%2 == 0:
            ans = (A+B)//2
        else:
            ans = 'impossible'.upper()
    print(ans)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect




from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

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

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

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

x = abs(a-b)

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

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

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

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

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    d = abs(b - a)
    if d & 1:
        ans = "IMPOSSIBLE"
    else:
        ans = min(a, b) + d // 2
    print(ans)

if __name__ ==  '__main__':
    main()

Solution (Python):
import itertools
import fractions
def main():
  a,b = map(int,input().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)-((A+B)//2)==0:
  print(((A+B)//2))
else:
  print('IMPOSSIBLE')

Solution (Python):
A,B = map(int, input().split())
D=(A-B)/2

if (A-B)//2==D:
  if D<0:
    D=D*(-1)
  print(max(A,B)-int(D))
else:
  print('IMPOSSIBLE')

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

def main():
    A,B = map(int, input().split())

    if A > B:
        A,B = B,A
    k = A + (abs(A-B) // 2)

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


if __name__ == "__main__":
    main()

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())
print( (a+b)//2 if (a-b)%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 abs(a-b)%2 == 1:
  print("IMPOSSIBLE")
else:
  print(int((a+b)/2))

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

a,b = iim()
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(abs(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)