from math import log from scipy import optimize n = int(input()) p = list(map(float, input().split())) q = list(map(float, input().split())) a = list(map(int, input().split())) def f(x): return sum((1-q[i]) / (1-q[i]*x) for i in range(n)) - x r = optimize.fsolve(f, 0.1)[0] #print(r) ans = 0 for i in range(n): ans += a[i] * log((1-q[i]) / (1-q[i]*r)) print(ans)