#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int x = 0, flag = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') flag *= -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - 48;
  return x * flag;
}
void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
const int Maxn = 2009;
const double eps = 1e-8;
int n, a, b;
double p[Maxn], u[Maxn];
void init() {
  n = read();
  a = read(), b = read();
  for (int i = (1), i_end_ = (n); i <= i_end_; ++i) scanf("%lf", &p[i]);
  for (int i = (1), i_end_ = (n); i <= i_end_; ++i) scanf("%lf", &u[i]);
}
double dp[Maxn];
int cntA[Maxn], cntB[Maxn];
void calc(double w1, double w2) {
  for (int i = (1), i_end_ = (n); i <= i_end_; ++i) {
    dp[i] = dp[i - 1];
    cntA[i] = cntA[i - 1];
    cntB[i] = cntB[i - 1];
    if (dp[i] < dp[i - 1] + p[i] - w1)
      dp[i] = dp[i - 1] + p[i] - w1, cntA[i] = cntA[i - 1] + 1,
      cntB[i] = cntB[i - 1];
    if (dp[i] < dp[i - 1] + u[i] - w2)
      dp[i] = dp[i - 1] + u[i] - w2, cntA[i] = cntA[i - 1],
      cntB[i] = cntB[i - 1] + 1;
    if (dp[i] < dp[i - 1] + p[i] - w1 + u[i] - w2 - p[i] * u[i])
      dp[i] = dp[i - 1] + p[i] - w1 + u[i] - w2 - p[i] * u[i],
      cntA[i] = cntA[i - 1] + 1, cntB[i] = cntB[i - 1] + 1;
  }
}
void solve() {
  double l = -1, r = 1, l1, r1, ans1 = 1, ans = 1;
  while (r - l >= eps) {
    double mid = (l + r) / 2;
    ans = 1;
    l1 = -1, r1 = 1;
    while (r1 - l1 >= eps) {
      double mid1 = (l1 + r1) / 2;
      calc(mid, mid1);
      if (cntB[n] > b)
        l1 = mid1;
      else
        r1 = mid1, ans = mid1;
    }
    calc(mid, ans);
    if (cntA[n] > a)
      l = mid;
    else
      r = mid, ans1 = mid;
  }
  calc(ans1, ans);
  printf("%.6lf\n", dp[n] + ans1 * a + ans * b);
}
int main() {
  init();
  solve();
  return 0;
}
