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

dp = Array.new(n+1) {Array.new(n+1) {Array.new(n+1, 0.0)}}
m = n.to_f

a1 = a.count(1)
a2 = a.count(2)
a3 = n - a1 - a2

(a3+1).times do |c3|
    (a3+a2+1).times do |c2|
        (n+1).times do |c1|
            s = c1 + c2 + c3
            next if s == 0 || s > n
            dp[c3][c2][c1] = m / s
            dp[c3][c2][c1] += dp[c3-1][c2+1][c1] * c3 / s if c3 > 0
            dp[c3][c2][c1] += dp[c3][c2-1][c1+1] * c2 / s if c2 > 0
            dp[c3][c2][c1] += dp[c3][c2][c1-1] * c1 / s if c1 > 0
        end
    end
end

p dp[a3][a2][a1]