#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
const int INF = 2e9;
const long long LINF = 1e18 + 5;
const long long MOD = 1e9 + 7;
const int MAX = 2002;
double dp[MAX][MAX];
int opt[MAX][MAX];
double p[MAX];
double q[MAX];
double pq[MAX];
int solve(double cost, int n, int a) {
  int op;
  double val;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= a; ++j) {
      op = 0;
      val = dp[i - 1][j];
      if (j > 0 && val < dp[i - 1][j - 1] + p[i]) {
        op = 1;
        val = dp[i - 1][j - 1] + p[i];
      }
      if (j > 0 && val < dp[i - 1][j - 1] + pq[i] - cost) {
        op = 2;
        val = dp[i - 1][j - 1] + pq[i] - cost;
      }
      if (val < dp[i - 1][j] + q[i] - cost) {
        op = 3;
        val = dp[i - 1][j] + q[i] - cost;
      }
      dp[i][j] = val;
      opt[i][j] = op;
    }
  }
  int ret = 0;
  int idx = a;
  for (int i = n; i >= 1; --i) {
    if (opt[i][idx] > 1) ret++;
    if (opt[i][idx] == 1 || opt[i][idx] == 2) --idx;
  }
  return ret;
}
int main() {
  int n, a, b;
  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", &q[i]);
  for (int i = 1; i <= n; ++i) {
    pq[i] = p[i] + q[i] - p[i] * 1.0 * q[i];
  }
  double lo = 0, hi = n;
  for (int it = 0; it < 40; ++it) {
    double mid = (lo + hi) / 2;
    if (solve(mid, n, a) >= b)
      lo = mid;
    else
      hi = mid;
  }
  solve(lo, n, a);
  cout << fixed << setprecision(10) << dp[n][a] + b * lo << endl;
  return 0;
}
