#include <bits/stdc++.h>
const int M = 1e5 + 5;
const int INF = 0x3f3f3f3f;
const int limit = 1e6;
const double eps = 1e-9;
int n, a, b;
double p[M], q[M], f[M], L;
int cnta[M], cntb[M];
inline int read() {
  int f = 1, s = 0;
  char ch = getchar();
  while (!isdigit(ch)) (ch == '-') && (f = -1), ch = getchar();
  while (isdigit(ch)) s = (s << 1) + (s << 3) + (ch ^ 48), ch = getchar();
  return f * s;
}
inline double check2(double mid, double mid2) {
  memset(f, -0x3f, sizeof(f));
  f[0] = 0;
  for (int i = 1; i <= n; ++i) {
    f[i] = f[i - 1], cnta[i] = cnta[i - 1], cntb[i] = cntb[i - 1];
    if (f[i] < f[i - 1] + p[i] - mid - eps) {
      f[i] = f[i - 1] + p[i] - mid;
      cnta[i] = cnta[i - 1] + 1;
      cntb[i] = cntb[i - 1];
    }
    if (f[i] < f[i - 1] + q[i] - mid2 - eps) {
      f[i] = f[i - 1] + q[i] - mid2;
      cnta[i] = cnta[i - 1];
      cntb[i] = cntb[i - 1] + 1;
    }
    if (f[i] < f[i - 1] + q[i] + p[i] - q[i] * p[i] - mid - mid2 - eps - eps) {
      f[i] = f[i - 1] + q[i] + p[i] - q[i] * p[i] - mid - mid2;
      cnta[i] = cnta[i - 1] + 1;
      cntb[i] = cntb[i - 1] + 1;
    }
  }
  return cntb[n] <= b;
}
inline double check1(double mid) {
  double l = 0, r = 1;
  for (int i = 1; i <= 50; ++i) {
    double mid2 = (l + r) / 2.0;
    check2(mid, mid2) ? r = mid2 : l = mid2;
  }
  return l;
}
int main() {
  n = read(), a = read(), b = read();
  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, ans = 0;
  for (int i = 1; i <= 50; ++i) {
    double mid = (l + r) / 2.0;
    check1(mid);
    cnta[n] <= a ? r = mid : l = mid;
  }
  double ans1 = l;
  double ans2 = check1(ans1);
  printf("%.4lf", f[n] + a * ans1 + b * ans2);
  return 0;
}
