output_description: Print the integer written into the block of step 1.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
      a_1 a_2 ... a_{2N-1}
attempt: def examA():
      N = I()
      S = SI()
      T = SI()
      ans = 2 * N
      for l in range(N - 1, -1, -1):
          flag = True
          for i in range(l + 1):
              if S[N - 1 - i] != T[l - i]:
                  flag = False
                  break
          if flag:
              ans -= l + 1
              break
      print(ans)
      return
  
  
  def examB():
      N, x = LI()
      d = defaultdict(bool)
      if x == 1 or x == 2 * N - 1:
          print("No")
          return
      print("Yes")
      ans = [0] * (2 * N - 1)
      ans[N - 1] = x
      d[x] = True
  
      ans[N] = x + 1
      ans[N - 2] = x - 1
      d[x + 1] = True
      d[x - 1] = True
      #    print(d); print(ans)
      cur = 1
      for j in range(N - 2):
          while d[cur]:
              cur += 1
          ans[j] = cur
          cur += 1
      for j in range(N + 1, 2 * N - 1):
          while d[cur]:
              cur += 1
          ans[j] = cur
          cur += 1
      for v in ans:
          print(v)
      return
  
  
  def examD():
      N = I()
      A = LI()
      next = [0] * (2 * N - 3)
      for i in range(1, 2 * N - 2):
          cur = [A[i - 1], A[i], A[i + 1]]
          cur.sort()
          next[i - 1] = cur[1]
      ans = next[2 * N - 4]
      print(ans)
      return
  
  
  import sys, copy, bisect, itertools, heapq, math
  from heapq import heappop, heappush, heapify
  from collections import Counter, defaultdict, deque
  
  
  def I():
      return int(sys.stdin.readline())
  
  
  def LI():
      return list(map(int, sys.stdin.readline().split()))
  
  
  def LSI():
      return list(map(str, sys.stdin.readline().split()))
  
  
  def LS():
      return sys.stdin.readline().split()
  
  
  def SI():
      return sys.stdin.readline().strip()
  
  
  mod = 10**9 + 7
  inf = float("inf")
  
  if __name__ == "__main__":
      examD()
  
problem_description: Statement
  
  We have a pyramid with N steps, built with blocks. The steps are numbered 1
  through N from top to bottom. For each 1≤i≤N, step i consists of 2i-1 blocks
  aligned horizontally. The pyramid is built so that the blocks at the centers
  of the steps are aligned vertically.
  
  ![](https://atcoder.jp/img/agc006/a2bde72df5ad036d1699f4a74d74a370.png)
  
  A pyramid with N=4 steps
  
  Snuke wrote a permutation of (1, 2, ..., 2N-1) into the blocks of step N.
  Then, he wrote integers into all remaining blocks, under the following rule:
  
    * The integer written into a block b must be equal to the median of the three integers written into the three blocks directly under b, or to the lower left or lower right of b.
  
  ![](https://atcoder.jp/img/agc006/a940f1d8303f255e1f91d17a5696633f.png)
  
  Writing integers into the blocks
  
  Afterwards, he erased all integers written into the blocks. Now, he only
  remembers that the permutation written into the blocks of step N was (a_1,
  a_2, ..., a_{2N-1}).
  
  Find the integer written into the block of step 1.
samples: [{"input": "4\n    1 6 3 7 4 5 2", "output": "4\n    \n\nThis case corresponds to the figure in the problem statement.\n\n* * *"}, {"input": "2\n    1 2 3", "output": "2"}]