#include <bits/stdc++.h>
using namespace std;
const int N = 2005, INF = 1e9;
int n, a, b;
double p[N], u[N];
pair<double, int> f[N][N];
void upd(pair<double, int> &f, pair<double, int> x) { f = min(f, x); }
pair<double, int> calc(double k) {
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= a; ++j) f[i][j] = make_pair(INF, 0);
  }
  f[0][0] = make_pair(0, 0);
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= a; ++j) {
      upd(f[i][j], f[i - 1][j]);
      upd(f[i][j + 1], make_pair(f[i - 1][j].first - p[i], f[i - 1][j].second));
      upd(f[i][j],
          make_pair(f[i - 1][j].first + k - u[i], f[i - 1][j].second + 1));
      upd(f[i][j + 1],
          make_pair(f[i - 1][j].first + k - (1. - (1. - u[i]) * (1. - p[i])),
                    f[i - 1][j].second + 1));
    }
  }
  return f[n][a];
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; ++i) scanf("%lf", &p[i]);
  for (int i = 1; i <= n; ++i) scanf("%lf", &u[i]);
  double l = 0, r = n;
  for (int i = 0; i < 50; ++i) {
    double mid = (l + r) / 2.;
    if (calc(mid).second <= b) {
      r = mid;
    } else {
      l = mid;
    }
  }
  printf("%.12f\n", l * b - calc(l).first);
}
