# coding: utf-8
n = gets().to_i
v = gets.split(" ").map{|e| e.to_i}
mem = {}
vp = v.permutation(n)
va = vp.map do |a|
  a.reduce{|e, m|
    key = [e, m].sort.map(&:to_s).join()
    if mem.has_key? key
      mem[key]
    else
      r = (e.to_f + m.to_f) / 2
      mem[key] = r
      r
    end
  }
end
puts va.max
