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):
hoge = input().split()
A = int(hoge[0])
B = int(hoge[1])

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

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

Solution (Python):
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().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.0
if int(K) - K == 0:
    print(int(K))
else:
    print("IMPOSSIBLE")

Solution (Python):
def main():
    a,b = map(int,input().split())
    if a == b:
        print(0)
        return
    if (a+b)%2 == 0:
        print((a+b)//2)
        return

    print('IMPOSSIBLE')


main()

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
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(' '))
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((a+b)//2)
else:
    print('IMPOSSIBLE')

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

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

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

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(abs(b - a) // 2 + min(a, b))

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

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

Solution (Python):
a,b=map(int,input().split())
l=[a,b]
l=sorted(l)
x,y=l[0],l[1]


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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
input = sys.stdin.readline






















def main():

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

	tmp = abs(A) + abs(B)
	tmp = tmp/2

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


if __name__ == "__main__":
	main()

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

Solution (Python):
import sys
s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  
sys.setrecursionlimit(int(1e+6))
MOD = int(1e+9) + 7



def main():
    A, B = i2nn()
    K = (A + B) // 2
    K2 = (A + B) / 2
    if K == K2:
        print(K)
    else:
        print('IMPOSSIBLE')

main()

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

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

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

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

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

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

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

Solution (Python):
import math
import sys
MAX_INT = int(10e9)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

A,B = IL()
ans = (A+B)/2
if int(ans) == math.ceil(ans):
    print(int(ans))
else:
    print("IMPOSSIBLE")

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

Solution (Python):
a, b = (int(_) for _ in 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:
    print(0)
elif (b-a) % 2 == 0:
    print((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):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return list(map(float, sys.stdin.readline().split()))
def LS():return sys.stdin.readline().split()
def SR(n): return [list(sys.stdin.readline())[:-1] for i in range(n)]
def IR(n): return [int(sys.stdin.readline()) for i in range(n)]
def LIR(n): return [list(map(int, sys.stdin.readline().split())) for i in range(n)]
def LSR(n): return [list(map(list, sys.stdin.readline().split())) for i in range(n)]
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

A, B = LI()
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())

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

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

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

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''

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

if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
if a>b:
    k=(a-b)//2+b
else:
    k=(b-a)//2+a
print(k 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):
import sys
input = sys.stdin.readline

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

if (A+B)/2==int((A+B)/2):
    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):


import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

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

if __name__ == '__main__':
    main()

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

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

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

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

Solution (Python):


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

    if X%2 == 1:
        print('IMPOSSIBLE')
    else:
        print(X//2)


if __name__ == '__main__':
    main()

Solution (Python):


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

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

Solution (Python):
import sys

input = sys.stdin.readline

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

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

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

def main():
    n,m=MAP()

    if (n+m) % 2 ==0:
        print(int((n+m)/2))
    else:
        print('IMPOSSIBLE')


if  __name__=='__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

a, b = [int(i) for i in input().split()]
c = (a+b)/2
d = int((a+b)/2)
if c == d:
    print(d)
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):
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())

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

Solution (Python):
n,m = map(int,input().split())


if (n + m) % 2 == 0:
    print((n + m) // 2)
else:
    print('IMPOSSIBLE')

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
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):
ll= lambda : list(map(int,input().split()))
testcases=1

for testcase in range(testcases):
    [a,b]=ll()
    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):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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


if __name__ == '__main__':
    main()

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

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

ans = (a+b)/2

if float.is_integer(ans):
    print(int(ans))

else:
    print('IMPOSSIBLE')

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

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

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

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
print(max(a, b) - abs(a - b) // 2 if not (a + b) % 2 else "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
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True


def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    a, b = LI()
    c = max(a, b)
    d = min(a, b)

    if (c - d) % 2 == 1:
        print("IMPOSSIBLE")
        return

    print((c+d)//2)

solve()

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

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


if __name__ == '__main__':
  main()

Solution (Python):

from __future__ import division, print_function

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


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




BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

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

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


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")



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):
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

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

tmp = A+B

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

Solution (Python):

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

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

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

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

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

Solution (Python):

import sys

NO = "IMPOSSIBLE"  


def solve(A: int, B: int):
    K = (A + B)/2
    if K % 1 == 0:
        print(int(K))
    else:
        print('IMPOSSIBLE')
    return



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


if __name__ == '__main__':
    main()

Solution (Python):

import sys

NO = "IMPOSSIBLE"  

def solve(A: int, B: int):
    d = A-B
    if d % 2 != 0:
        print(NO)
        return
    print((A + B) // 2)
    return



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

if __name__ == '__main__':
    main()

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

if (A+B) % 2 == 1 :
    print("IMPOSSIBLE")
else :
    print((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
input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys

fin = sys.stdin.readline
A, B = [int(elem) for elem in fin().split()]

sum_ab = A + B

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

Solution (Python):











import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B = MI()
    if abs(A-B)%2 == 0:
        print(min(A,B)+abs(A-B)//2)
    else:
        print("IMPOSSIBLE")
if __name__ == '__main__':
    main()

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


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

Solution (Python):
n, m = map(int,input().split())

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

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

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


A, B = list(map(int, sys.stdin.readline().split()))
if (A + B) & 1:
    print('IMPOSSIBLE')
else:
    print((A + B)//2)

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



def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    a, b = rli()
    if (a + b) % 2 == 1:
        print("IMPOSSIBLE")
    else:
        print((a+b) // 2)


if __name__ == '__main__':
    main()

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

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

Solution (Python):


def main():
    a, b = map( int, input().split())
    if a > b:
        a, b = b, a
    if (b-a)%2 == 1:
        print("IMPOSSIBLE")
    else:
        print(a + (b-a)//2)
if __name__ == '__main__':
    main()

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 = [int(item) for item in input().split()]
ans = (a + b) // 2

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

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

Solution (Python):



import itertools as ite
import math
import random
import sys
import codecs
from collections import defaultdict

INF = 10 ** 18
MOD = 10 ** 9 + 7

sys.setrecursionlimit(1000000)

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

Solution (Python):

import sys

def get_num():
    return int(input())


def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(input())
    return res


def get_numbers():
    return map(int, input().split())


a, b = get_numbers()


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

Solution (Python):

import sys
import math
from collections import defaultdict


sys.setrecursionlimit(10**7)
def input():
  return sys.stdin.readline()[:-1]


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))



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

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

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