import heapq, time n = int(input()) p = list(map(int, input().split())) q = list(map(int, input().split())) pq = [] for i in range(n): heapq.heappush(pq, (-p[i] * q[i] / 100000, i)) start = time.time() ans, cnt = 0, 1 while time.time() - start < 1.9: pp, id = heapq.heappop(pq) ans += -cnt * pp cnt += 1 heapq.heappush(pq, (pp * (1 - q[id] / 100), id)) print(ans)