#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const double eps = 1e-9;
int n, ca, cb, ct[2][N], pv;
double p[N], q[N], f[2][N], res;
bool check(double dat) {
  for (int _ = 0; _ < 2; _++)
    for (int i = 0; i <= ca; i++) f[_][i] = -1e18;
  f[0][0] = 0;
  memset(ct, 0, sizeof(ct));
  for (int _ = 1; _ <= n; _++) {
    int tmp = _ & 1, lst = tmp ^ 1;
    for (int i = 0; i <= ca; i++) f[tmp][i] = -1e18;
    for (int i = 0; i <= ca; i++) {
      f[tmp][i] = f[lst][i];
      ct[tmp][i] = ct[lst][i];
      double cc;
      if (i > 0) {
        cc = f[lst][i - 1] + p[_];
        if (cc - eps > f[tmp][i]) {
          f[tmp][i] = cc;
          ct[tmp][i] = ct[lst][i - 1];
        }
      }
      cc = f[lst][i] + q[_] - dat;
      if (cc - eps > f[tmp][i]) {
        f[tmp][i] = cc;
        ct[tmp][i] = ct[lst][i] + 1;
      }
      if (i > 0) {
        cc = f[lst][i - 1] + 1 - (1 - p[_]) * (1 - q[_]) - dat;
        if (cc - eps > f[tmp][i]) {
          f[tmp][i] = cc;
          ct[tmp][i] = ct[lst][i - 1] + 1;
        }
      }
    }
  }
  res = -1e18;
  for (int i = 0; i <= ca; i++) {
    if (f[n & 1][i] > res) {
      res = f[n & 1][i];
      pv = ct[n & 1][i];
    }
  }
  return pv <= cb;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> ca >> cb;
  for (int i = 1; i <= n; i++) cin >> p[i];
  for (int i = 1; i <= n; i++) cin >> q[i];
  double ll = 0, rr = 1;
  for (int tim = 1; tim <= 60; tim++) {
    double mid = (ll + rr) / 2.0;
    if (check(mid))
      rr = mid;
    else
      ll = mid;
  }
  check(rr);
  cout << fixed << setprecision(10) << res + cb * rr << '\n';
  return 0;
}
