#include <bits/stdc++.h>
const double eps = 1e-10;
int n, a, b, cnta[100010], cntb[100010];
double p[100010], q[100010], f[100010];
void check2(double costa, double costb) {
  for (int i = 1; i <= n; i++) {
    f[i] = 0;
    cnta[i] = 0;
    cntb[i] = 0;
    f[i] = f[i - 1];
    cnta[i] = cnta[i - 1];
    cntb[i] = cntb[i - 1];
    if (f[i] < f[i - 1] + p[i] - costa - eps) {
      f[i] = f[i - 1] + p[i] - costa;
      cnta[i] = cnta[i - 1] + 1;
      cntb[i] = cntb[i - 1];
    }
    if (f[i] < f[i - 1] + q[i] - costb - eps) {
      f[i] = f[i - 1] + q[i] - costb;
      cnta[i] = cnta[i - 1];
      cntb[i] = cntb[i - 1] + 1;
    }
    if (f[i] < f[i - 1] + p[i] - costa + q[i] - costb - p[i] * q[i] - eps) {
      f[i] = f[i - 1] + p[i] - costa + q[i] - costb - p[i] * q[i];
      cnta[i] = cnta[i - 1] + 1;
      cntb[i] = cntb[i - 1] + 1;
    }
  }
}
double check1(double cost) {
  double l = 0, r = 1, mid;
  for (int i = 1; i <= 50; i++) {
    mid = (l + r) / 2;
    check2(cost, mid);
    if (cntb[n] > b)
      l = mid;
    else
      r = mid;
  }
  return l;
}
double l, r, mid, v, ans;
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);
  l = 0;
  r = 1;
  while (r - l > eps) {
    mid = (l + r) / 2.0;
    v = check1(mid);
    if (cnta[n] > a)
      l = mid;
    else
      r = mid;
  }
  check2(l, v);
  printf("%.10lf\n", f[n] + l * a + v * b);
  return 0;
}
