$dp = []
def f a
    $dp = Array.new(310).map{ Array.new(310).map{ Array.new(310, nil) } }
    dfs(*a.inject([0] * 3){|r, i| r[i-1] += 1; r}, a.size)
end
def dfs i, j, k, n
    if r = $dp[i][j][k]
        r
    elsif i == 0 && j == 0 && k == 0
        0.0
    elsif i < 0 or j < 0 or k < 0
        0.0
    else
        r = 0.0
        if i > 0
            r += dfs(i - 1, j, k, n) * i
        end
        if j > 0
            r += dfs(i + 1, j - 1, k, n) * j
        end
        if k > 0
            r += dfs(i, j + 1, k - 1, n) * k
        end
        $dp[i][j][k] = (r + n) / (i + j + k)
    end
end

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