output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N i
attempt: n = int(input())
  nums = [int(x) for x in input().split()]
  
  
  def findMedian(nums):
      size = len(nums)
      mIndex = (size * (size + 1) // 2) + 1
      gap = 0
      mValue = 0
      while mIndex > 0 and gap < size:
          start = 0
          end = start + gap
          while end < size and mIndex > 0:
              mIndex -= 1
              mValue = nums[(start + end + 1) // 2]
              start += 1
              end += 1
          gap += 1
      return mValue
  
  
  print(findMedian(nums))
  
problem_description: Statement
  
  There is an N-car train.
  
  You are given an integer i. Find the value of j such that the following
  statement is true: "the i-th car from the front of the train is the j-th car
  from the back."
samples: [{"input": "4 2", "output": "3\n    \n\nThe second car from the front of a 4-car train is the third car from the back.\n\n* * *"}, {"input": "1 1", "output": "1\n    \n\n* * *"}, {"input": "15 11", "output": "5"}]