import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = sc.nextInt(); } PriorityQueue queue = new PriorityQueue<>(); for (int i = 0; i < n; i++) { queue.add(new Room(arr[i], sc.nextInt())); } double expect = 0; for (int i = 1; i < 1000000; i++) { Room r = queue.poll(); expect += r.allRate * i; r.next(); queue.add(r); } System.out.println(expect); } static class Room implements Comparable { double rate; double allRate; public Room (int rate1, int rate2) { rate = rate2 / 100.0; allRate = rate1 / 1000.0 * rate; rate = 1 - rate; } public int compareTo(Room another) { if (allRate == another.allRate) { return 0; } else if (allRate > another.allRate) { return -1; } else { return 1; } } public void next() { allRate *= rate; } } }