N=int(raw_input()) A=map(int,raw_input().split()) needs=[0 for i in range(4)] dp=[[[-1.0 for i in range(100)]for j in range(100)]for k in range(100)] def rec(a,b,c): global dp if a==0 and b==0 and c==0: return 0 if a<0 or b<0 or c<0: return 0 if dp[a][b][c]!=-1.0: return dp[a][b][c] dp[a][b][c]=0.0 dp[a][b][c]+= ( N*1.0/(a+b+c)+rec(a-1,b,c))* a*1.0/(a+b+c) dp[a][b][c]+= ( N*1.0/(a+b+c)+rec(a+1,b-1,c))* b*1.0/(a+b+c) dp[a][b][c]+= ( N*1.0/(a+b+c)+rec(a,b+1,c-1))* c*1.0/(a+b+c) #print a,b,c,dp[a][b][c] return dp[a][b][c] for a in A: if a<3: needs[3-a]+=1 print rec(needs[1],needs[2],needs[3])