let n = read_int ()

let rec read_ints accu = function
  | 0 -> List.rev accu
  | k -> read_ints ((Scanf.scanf " %d" (fun x -> x)) :: accu) (k-1)

let a = Array.of_list (read_ints [] (2*n-1))


let check x =
  let i = ref (n-1) and j = ref (n-1) in
  while !i > 0 && (a.(!i-1)>=x) != (a.(!i)>=x) do
    i := !i - 1
  done;
  while !j < 2*n-2 && (a.(!j+1)>=x) != (a.(!j)>=x) do
    j := !j + 1
  done;
  if n-1- !i < !j-n+1 then a.(!i)>=x else a.(!j)>=x

let rec bsearch l r = if r = l+1 then l else let m = (l+r)/2 in if check m then bsearch m r else bsearch l m

let () = print_int (bsearch 1 (2*n))