require 'pp'

# Nと空白区切の入力値を数値の配列で返却する
def gets_n_and_i_list()
  return gets.chomp.to_i, gets.chomp.split(" ").map(&:to_f)
end

N, v_list = gets_n_and_i_list

v_list.sort!

while v_list.size > 1
  min_dv = v_list.last
  min_i  = nil

  1.upto(v_list.size - 1) do |i|
    dv = v_list[i] - v_list[i - 1]
    if min_dv > dv
      min_i = i
      min_dv = dv
    end
  end

  new_v = (v_list[min_i] + v_list[min_i - 1])/2
  v_list.delete_at(min_i)
  v_list.delete_at(min_i - 1)
  v_list.push(new_v)
  v_list.sort!
end
p v_list[0]
  