output_description: Print the integer K satisfying the condition.
  
  If such an integer does not exist, print `IMPOSSIBLE` instead.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B
attempt: N = int(input())
  monster = list(map(int, input().split()))
  hero = list(map(int, input().split()))
  
  total = 0
  i = -1
  
  for i in range(N + 1):
      if i == 0:
          if monster[0] < hero[0]:
              total += monster[0]
              hero[0] -= monster[0]
              monster[0] = 0
          else:
              total += hero[0]
              monster[0] -= hero[0]
              hero[0] = 0
  
      elif i < N:
          if monster[i] < hero[i - 1]:
              total += monster[i]
              hero[i - 1] -= monster[i]
              monster[i] = 0
          else:
              total += hero[i - 1]
              monster[i] -= hero[i - 1]
              hero[i - 1] = 0
  
              if monster[i] < hero[i]:
                  total += monster[i]
                  hero[i] -= monster[i]
                  monster[i] = 0
              else:
                  total += hero[i]
                  hero[i] = 0
                  monster[i] -= hero[i]
      else:
          if monster[N] < hero[N - 1]:
              total += monster[N]
          else:
              total += hero[N - 1]
  
  print(total)
  
problem_description: 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.
samples: [{"input": "2 16", "output": "9\n    \n\n|2 - 9| = 7 and |16 - 9| = 7, so 9 satisfies the condition.\n\n* * *"}, {"input": "0 3", "output": "IMPOSSIBLE\n    \n\nNo integer satisfies the condition.\n\n* * *"}, {"input": "998244353 99824435", "output": "549034394"}]