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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
import os, sys, re, math

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

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

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

Solution (Python):
import os, sys, re, math

(A, B) = [int(n) for n in input().split()]

(A, B) = (A, B) if A < B else (B, A)
if (B - A) % 2 == 0:
    c = (B - A) // 2
    print(B - c)
else:
    print('IMPOSSIBLE')

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

if abs(A-B) % 2 != 0:
  print('IMPOSSIBLE')
  sys.exit()
  
print((A + B) // 2)

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

Solution (Python):
a, b = list(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:
    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())

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

Solution (Python):
a,b = map(int,input().split())
if (a^b)&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):
s=sum(map(int,input().split()));print('IMPOSSIBLE' if s%2 else s//2)

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

K = A+B

print(K//2 if K//2 == K/2 else 'IMPOSSIBLE')

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

k = (A + B) / 2

answer = 0

if A != B and (A + B) % 2 == 0 and (A - k) * (B - k) < 0:
	print(int(k))
else:
	print("IMPOSSIBLE")

Solution (Python):

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

answer = 0
K= (A+B)/2

if A!= B and (A+B)%2 == 0 and (A-K)*(B-K)<0:
	print(int(K))
else:
  	print("IMPOSSIBLE")

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

if a > b:
  K = a+b
else:
  K = b+a

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

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
answer = (A+B) / 2
if int(answer) != answer:
    print('IMPOSSIBLE')
else:
    print(int(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 == 0:
    ans = (a+b)//2
else:
    ans = "IMPOSSIBLE"

print(ans)

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 % 2 == 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):


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

C = abs(A - B)//2
if A == 0 or abs(A - B)%2 != 0:
    print('IMPOSSIBLE')
else:
    print(abs(min(A, B)) + C)

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

if (a - b) % 2 == 0:
    print(int(min(a, b) + abs(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):
import math
a,b = map(int,input().split())
num = a + b
if num < 0:
  num = -num
if num % 2 == 0:
  print(math.floor(num/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("IMPOSSIBLE" if (a+b)%2==1 else (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())
diff = a - b


if diff%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((A+B)//2)

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.buffer.readline().split()))
    print((A+B)//2 if (A+B)%2 == 0 else 'IMPOSSIBLE')


if __name__ == '__main__':
    main()

Solution (Python):
a, b = [int(x) for x in 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 == 0:
    print(round((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):
A,B=map(int,input().split())
if abs(A+B)%2==0:
    print(abs(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())

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

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

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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())
a = min(A, B)
b = max(A, B)
if (b-a)%2 == 0:
    print(a+(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):

"""
A - Harmony
https://atcoder.jp/contests/abc135/tasks/abc135_a

"""
import sys


def solve(A, B):
    if A > B:
        A, B = B, A
    diff = B - A
    if diff % 2:
        return 'IMPOSSIBLE'
    return B - diff // 2


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
d=eval(input().replace(' ','+'))
print([d//2,'IMPOSSIBLE'][d%2])

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

Solution (Python):
def solve():
    N, M = map(int, input().split())
    if (N+M) % 2 == 0:
        return (N+M)//2
    return 'IMPOSSIBLE'

print(solve())

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

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

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

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 ==1:
    print("IMPOSSIBLE")
else:
    print(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())

if abs(A-B) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print(abs(A-B)//2+min(A, 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())
c=(a+b)/2
if(c.is_integer()==True):
    print(int((a+b)/2))
else:
    print("IMPOSSIBLE")

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

Solution (Python):

import sys

NO = "IMPOSSIBLE"  


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


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))  
    print(solve(A, B))

if __name__ == '__main__':
    main()

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

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


if __name__ == "__main__":
    main()

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()))
asn = (A + B) /2
if asn.is_integer() == True:
    print(int(asn))
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 = int(A)
B = int(B)

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

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

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

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

res = a + b

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

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

Solution (Python):
from sys import stdin

a, b = (int(x) for x in stdin.readline().rstrip().split())
print("IMPOSSIBLE" if (a+b)%2!=0 else (a+b)//2)

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

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

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

Solution (Python):
import sys

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==1:
    print('IMPOSSIBLE')
elif (A+B)%2==0:
    print((A+B)//2)

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

Solution (Python):
A,B = sorted(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 (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("IMPOSSIBLE")
else:
    print((a+b)//2)

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

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





import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    a, b = list(map(int,ipti().split()))

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

if __name__ == '__main__':
    main()

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

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

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

K = (A + B) / 2
K_th = (A + B) // 2

print('IMPOSSIBLE' if K!=K_th else int(K))

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

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

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

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

Solution (Python):
number = input().split(" ")
A = int(number[0])
B = int(number[1])
ans =(A + B)/2
if ans.is_integer() == True:
    print(int(ans))
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):
AB = list(map(int, input().split()))
total = sum(AB)

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

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

c = (a + b) / 2
if a != b and c.is_integer():
    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())
X = (A+B)/2
if (A+B)%2 != 0:
  print("IMPOSSIBLE")
else:
  print(int(X))

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

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

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

i = (A+B)/2 

if i % 1 ==0:
    print(int(i))
else:
    print('IMPOSSIBLE')

Solution (Python):
import sys

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

def main():
    c = a + b
    return 'IMPOSSIBLE' if c & 1 else c // 2

if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

div, modAB = divmod(A + B, 2)
if modAB == 0:
    print(div)
else:
    print("IMPOSSIBLE")

Solution (Python):
s=eval(input().replace(" ","+"))
print(s//2 if s%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):
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
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()))
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 == 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 = [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())
div, mod = divmod(abs(A - B), 2)

if mod == 0:
    print(min(A, B) + div)
else:
    print("IMPOSSIBLE")

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

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

Solution (Python):
import sys

a, b = map(int, sys.stdin.read().split())
if (a + b) % 2 == 1:
    print('IMPOSSIBLE')
else:
    print(int((a + b) / 2))

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

Solution (Python):
A,B = (int(x) for x in 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("IMPOSSIBLE")
else:
    print(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())

if (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((a + b) // 2)

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

Solution (Python):
A, B = (int(ab) for ab in input().split())
K = (A+B)/2
if K == int(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() )

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

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

Solution (Python):
l = list(map(int, input().split()))
s = sorted(l, reverse=True)
cal = s[0] - s[1]
result = s[1] + (cal / 2)
if result.is_integer():
    print(int(result))
else:
    print("IMPOSSIBLE")

Solution (Python):




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


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):

import sys

NO = "IMPOSSIBLE"  


def solve(A: int, B: int):
    small = min(A,B)
    big = max(A,B)
    diff = big - small
    if diff % 2 == 0:
        print(int(small+diff/2))
    else:
        print(NO)



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

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 (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=map(int,input().split())
if ((A+B)/2)%1==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 (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):



import sys
input = sys.stdin.readline


def solve(A, B):
    K = (A + B) / 2
    if int(K) == K:
        return int(K)
    return 'IMPOSSIBLE'




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









print(solve(A, B))

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

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

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

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

Solution (Python):

a,b=map(int,input().split())
ans="IMPOSSIBLE"
if (a+b)%2==0:
    k=(a+b)/2
    ans=str(int(k))
print(ans)

Solution (Python):
import sys
row = sys.stdin.readline
def read_ints(row):
    return list(map(int, row().split()))
  
A,B = read_ints(row)
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("IMPOSSIBLE")
else:
    print(int((A+B)/2))