def f a
    dfs(a.inject(Array.new(a.max + 1, 0)){|r, i| r[i] += 1; r}, a.size, {}).to_f
end

def dfs a, n, m
    if r = m[a]
        r
    elsif a[0] == n
        0r
    else
        r = (1...a.size)
            .select{|j| a[j] > 0}
            .map{|j| [dfs([*a[0...j-1], a[j-1] + 1, a[j] - 1, *a[j+1..-1]], n, m)] * a[j]}
            .flatten
        m[a] = n.to_f / (n - a[0]) + r.inject(:+) / r.size
    end
end

n = gets.to_i
a = gets.split.map(&:to_i)
p f(a)