def f a
    m = Array.new(310).map{ Array.new(310).map{ Array.new(310, nil) } }
    n = a.size
    i, j, k = a.inject([0] * 3){|r, i| r[i-1] += 1; r}
    for k_ in 0 .. k
        for j_ in 0 .. j + k - k_
            for i_ in 0 .. i + j + k - j_ - k_
                if i_ == 0 && j_ == 0 && k_ == 0
                    m[0][0][0] = 0.0
                else
                    r = 0.0
                    r += i_ > 0 ? m[k_][j_][i_-1] * i_ : 0.0
                    r += j_ > 0 ? m[k_][j_-1][i_+1] * j_ : 0.0
                    r += k_ > 0 ? m[k_-1][j_+1][i_] * k_ : 0.0
                    m[k_][j_][i_] = (r + n) / (i_ + j_ + k_)
                end
            end
        end
    end
    m[k][j][i]
end

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