import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); Room[] rooms = new Room[n]; for (int i = 0; i < n; i++) { rooms[i] = new Room(sc.nextInt()); } for (int i = 0; i < n; i++) { rooms[i].find(sc.nextInt()); } PriorityQueue queue = new PriorityQueue<>(); for (int i = 0; i < n; i++) { queue.add(rooms[i]); } double ans = 0; for (int i = 1; i < 1000000; i++) { Room r = queue.poll(); ans += r.rate * i; r.add(); queue.add(r); //System.out.println(ans); } System.out.println(ans); } static class Room implements Comparable { double lostRate; double findRate; double notFindRate; double rate; public Room(int x) { lostRate = x / 1000.0; } public void find(int x) { findRate = x / 100.0; notFindRate = 1 - findRate; rate = lostRate * findRate; } public void add() { rate *= notFindRate; } public int compareTo(Room another) { if (rate == another.rate) { return 0; } else if (rate < another.rate) { return 1; } else { return -1; } } } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public double nextDouble() throws Exception { return Double.parseDouble(next()); } public String nextLine() throws Exception { return br.readLine(); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }