import java.util.PriorityQueue; import java.util.Scanner; public class Main_yukicoder210 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] p = new int[n]; int[] q = new int[n]; for (int i = 0; i < n; i++) { p[i] = sc.nextInt(); } for (int i = 0; i < n; i++) { q[i] = sc.nextInt(); } PriorityQueue pq = new PriorityQueue(); for (int i = 0; i < n; i++) { pq.add(new Foo((double)p[i] * q[i] / 100000, i)); } double ret = 0.0; final double EPS = 1.e-9; for (int i = 1; i < 1000000; i++) { Foo tmp = pq.poll(); ret += tmp.p * i; tmp.p *= 1.0 - (double)q[tmp.i] / 100; if (tmp.p != 0.0 && tmp.p * i < EPS) { break; } pq.add(tmp); } System.out.printf("%.6f\n", ret); sc.close(); } private static class Foo implements Comparable { double p; int i; public Foo(double p, int i) { this.p = p; this.i = i; } @Override public int compareTo(Foo o) { return Double.compare(o.p, this.p); } } }