(defn cont-sub [n v]
  (for [i (range 1 (inc n))]
    (loop [vect v
           r    []]
      (if (> i (count vect))
        r
        (recur (drop 1 vect) (conj r (take i vect)))))))

(defn med [v]
  (get (vec (sort v)) (int (Math/floor (/ (count v) 2)))))

(defn med-med [n v]
  (med (flatten (map (fn [v] (map med v)) (cont-sub n v)))))

(defn -main []
  (let [n (Integer/parseInt (read-line))
        v (map #(Integer/parseInt %) (clojure.string/split (read-line) #"\s"))]
    (println (med (flatten (map (fn [vs] (map med vs)) (cont-sub n v)))))))