#include #define rep(i, n) for (int (i) = 0; (i) < (int)(n); (i)++) const int dx[] = {1, 0, -1, 0}; const int dy[] = {0, 1, 0, -1}; using namespace std; typedef long long ll; typedef vector vi; typedef vector vll; typedef pair pii; double p[1111], q[1111], r[1111]; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; for (int i = 0; i < n; i++) { cin >> p[i]; p[i] /= 1000.; } for (int i = 0; i < n; i++) { cin >> q[i]; q[i] /= 100.; } priority_queue > que; for (int i = 0; i < n; i++) { que.push(make_pair(p[i]*q[i], i)); } double ans = 0; for (int i = 1; i < 1000000; i++) { auto now = que.top(); que.pop(); ans += now.first * i; double next = now.first * (1-q[now.second]); que.push(make_pair(next, now.second)); } printf("%.10lf\n", ans); return 0; }