n=gets.chomp!.to_i
as=gets.split(" ").map(&:to_i)
au=Array.new
as.sort!
=begin
d1=(as[0].to_i+as[1]) / 2.0
au.push(d1)
if n==2
  p d1
  exit
end

for i in 2..as.length
  d = (as[i].to_i+as[i-2].to_i) / 2.0
  au.push(d)
end
=end
if as.length<=2
  p as.inject(:+)/2.0
  exit
end
i=0
while i <= n
  if i == 0
  d = (as[i].to_i+as[i+1].to_i) / 2.0
  as[i..i+1] = d
  else
    d = (as[i-1].to_i+as[i].to_i) / 2.0

  end
  #p as
  i+=1
  if as.length==2
    break
  end
end

ans = (as[0]+as[1]) / 2
p ans
