program main
  implicit none
  integer :: n, i
  real(8) :: res(50)
  read (*, *) n
  read (*, *) res(1:n)
  do i = 1, n - 1
    call insertion_sort(res(1:n))
    res(i + 1) = (res(i) + res(i + 1)) * 0.5
  end do
  write (*, "(f0.7)") res(n)

  contains

  subroutine insertion_sort(s)
    real(8), intent(inout) :: s(:)
    real(8) :: tmp
    integer :: i, j
    do i = 2, size(s)  ! ループ終了時に [1, i] が昇順
      do j = i, 2, -1  ! i の位置にあった新要素が適切な位置に来るまで隣同士 swap
        if (s(j) >= s(j - 1)) exit
        tmp = s(j)
        s(j) = s(j - 1)
        s(j - 1) = tmp
      end do
    end do
  end subroutine insertion_sort
end program main
