#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 5;
const double eps = 1e-8;
int n, a, b, num[maxn][maxn];
double p[maxn], q[maxn], dp[maxn][maxn];
bool ck(double x) {
  double tmp;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= a; j++) {
      dp[i][j] = dp[i - 1][j], num[i][j] = num[i - 1][j];
      tmp = dp[i - 1][j] + q[i] - x;
      if (tmp > dp[i][j]) {
        dp[i][j] = tmp;
        num[i][j] = num[i - 1][j] + 1;
      }
      if (j == 0) continue;
      tmp = dp[i - 1][j - 1] + p[i];
      if (tmp > dp[i][j]) {
        dp[i][j] = tmp;
        num[i][j] = num[i - 1][j - 1];
      }
      tmp = dp[i - 1][j - 1] + p[i] + q[i] - p[i] * q[i] - x;
      if (tmp > dp[i][j]) {
        dp[i][j] = tmp;
        num[i][j] = num[i - 1][j - 1] + 1;
      }
    }
  }
  return num[n][a] <= b;
}
signed 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", q + i);
  double l = 0, r = 1.0, mid;
  while (r - l > eps) {
    mid = (l + r) / 2;
    if (ck(mid))
      r = mid;
    else
      l = mid;
  }
  ck(l);
  printf("%.4f\n", dp[n][a] + 1.0 * l * b);
}
