from Queue import * # Queue, LifoQueue, PriorityQueue from bisect import * #bisect, insort from collections import * #deque, Counter,OrderedDict,defaultdict #set([]) import math import copy import itertools import string import sys myread = lambda : map(float,raw_input().split()) def solver(): N = int(raw_input()) P = myread() Q = myread() for i in xrange(N): P[i] /= 1000 Q[i] /= 100 que = PriorityQueue(N) for i in xrange(N): que.put((-P[i]*Q[i],i)) times = 1 ans = 0.0 e = 0.1 ** 16 while not(que.empty()): t = que.get() p = t[0] now = t[1] if times >= 1000000: break ans += (-p) * times times += 1 if (-p) * (1- Q[now]) > e: que.put((p*(1-Q[now]),now)) print "%.8f" % ans if __name__ == "__main__": solver()