n = gets.to_i
a = gets.split(" ").map(&:to_i)
count = [1,2,3].map{|x| a.count(x) }
memo = {}

solve = ->(nums) {
  if nums == [0, 0, 0]
    return 0.0
  elsif memo[nums]
    memo[nums]
  else
    ans = 0.0
    m = nums[0] + nums[1] + nums[2]
    if nums[0] > 0 then ans += solve.([nums[0] - 1, nums[1], nums[2]]) * nums[0] / m.to_f end
    if nums[1] > 0 then ans += solve.([nums[0] + 1, nums[1] - 1, nums[2]]) * nums[1] / m.to_f end
    if nums[2] > 0 then ans += solve.([nums[0], nums[1] + 1, nums[2] - 1]) * nums[2] / m.to_f end
    add = n.to_f / (nums[0] + nums[1] + nums[2])
    ans += add
    memo[nums] = ans
    ans
  end
}

puts solve.(count)