import std.stdio;
import std.algorithm;
import std.array;
import std.conv;
import std.datetime;
import std.numeric;
import std.math;
import std.string;

string my_readln() { return chomp(readln()); }

void main()
{
	auto tokens = my_readln().split();
	auto N = tokens[0].to!ulong;
	uint[4] a;
	foreach (token; my_readln.split)
	{
		++a[token.to!uint];
	}

	double[uint[4]] memo;

	double f(uint[4] x)
	{
		if (x[0] == N) return 0.0;
		if (memo.get(x, 0.0) != 0.0) return memo[x];

		auto p1 = x[1] / cast(double)N;
		auto p2 = x[2] / cast(double)N;
		auto p3 = x[3] / cast(double)N;
		auto p123 = p1 + p2 + p3;
		auto p = 1.0 / p123;
		if (x[3] != 0)
			p += f([x[0], x[1], x[2]+1, x[3]-1]) * p3 / p123;
		if (x[2] != 0)
			p += f([x[0], x[1]+1, x[2]-1, x[3]]) * p2 / p123;
		if (x[1] != 0)
			p += f([x[0]+1, x[1]-1, x[2], x[3]]) * p1 / p123;
		
		memo[x] = p;
		return p;
	}

	writefln("%.10f", f(a));
	stdout.flush();
}