import sequtils,strutils,math var N = stdin.readline.parseInt A = stdin.readline.split.map(parseInt) ans : float = 0 P : array[101, array[101, array[101, float]]] c : array[3, int] P[0][0][1] = N.float proc solve(a, b, c : int) : float = var k = N - a - b - c if P[a][b][c] > 0: return P[a][b][c] if a > 0: result += solve(a - 1, b + 1, c) * (a / (a + b + c)) if b > 0: result += solve(a, b - 1, c + 1) * (b / (a + b + c)) if c > 0: result += solve(a, b, c - 1) * (c / (a + b + c)) result += N / (a + b + c) P[a][b][c] = result for a in A: if a > 2: continue c[a] += 1 ans = solve(c[0], c[1], c[2]) echo ans