#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 10;
const double eps = 1e-8;
int n, a, b, ta[maxn], tb[maxn];
double p[maxn], q[maxn], dp[maxn], ans;
int calc(double ca, double cb, bool f) {
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1];
    ta[i] = ta[i - 1];
    tb[i] = tb[i - 1];
    if (dp[i - 1] + p[i] - ca - dp[i] > eps) {
      dp[i] = dp[i - 1] + p[i] - ca;
      ta[i] = ta[i - 1] + 1;
      tb[i] = tb[i - 1];
    }
    if (dp[i - 1] + q[i] - cb - dp[i] > eps) {
      dp[i] = dp[i - 1] + q[i] - cb;
      ta[i] = ta[i - 1];
      tb[i] = tb[i - 1] + 1;
    }
    if (dp[i - 1] + q[i] + p[i] - q[i] * p[i] - ca - cb - dp[i] > eps) {
      dp[i] = dp[i - 1] + q[i] + p[i] - q[i] * p[i] - ca - cb;
      ta[i] = ta[i - 1] + 1;
      tb[i] = tb[i - 1] + 1;
    }
  }
  return f ? ta[n] : tb[n];
}
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", &q[i]);
  double l1 = 0, r1 = 1.0, l2 = 0, r2 = 0;
  while (r1 - l1 > eps) {
    double c1 = (l1 + r1) / 2;
    l2 = 0, r2 = 1.0;
    while (r2 - l2 > eps) {
      double c2 = (l2 + r2) / 2;
      if (calc(c1, c2, 0) <= b)
        r2 = c2;
      else
        l2 = c2;
    }
    if (calc(c1, r2, 1) <= a)
      r1 = c1;
    else
      l1 = c1;
  }
  calc(r1, r2, 0);
  printf("%lf\n", dp[n] + r1 * a + r2 * b);
  return 0;
}
