import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) n = int(input()) p = list(map(int, input().split())) q = list(map(int, input().split())) p = [v/1000 for v in p] q = [v/100 for v in q] from heapq import heappop as hpp, heappush as hp, heappushpop as hppp, heapreplace as hr from random import random as r def sub(): h = [(-v*q[i],i) for i,v in enumerate(p)] heapify(h) ans = 0 count = [0]*n total = 1 pp = 1 for ii in range(10**6): pr,i = h[0] pr *= -1 pr2 = (1-q[i])*pr hr(h, (-pr2, i)) ans += (ii+1)*pr # print(ans, pr) return ans ans = sub() print(ans)