#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void chkmax(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
inline void chkmin(T& x, U y) {
  if (y < x) x = y;
}
double dp[2][2222][2222];
double p[2222], u[2222];
int main() {
  int n, a, b;
  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", &u[i]);
  int now = 0;
  for (int i = 1; i <= n; i++) {
    now ^= 1;
    for (int j = 1; j <= a && j <= i; j++)
      dp[now][j][0] = max(dp[!now][j][0], dp[!now][j - 1][0] + p[i]);
    for (int k = 1; k <= b && k <= i; k++)
      dp[now][0][k] = max(dp[!now][0][k], dp[!now][0][k - 1] + u[i]);
    for (int j = max(1, a - (n - i)); j <= i && j <= a; j++) {
      for (int k = max(1, b - (n - i)); k <= i && k <= b; k++) {
        dp[now][j][k] = max(dp[!now][j][k],
                            dp[!now][j - 1][k - 1] + p[i] + u[i] - p[i] * u[i]);
        chkmax(dp[now][j][k], dp[!now][j - 1][k] + p[i]);
        chkmax(dp[now][j][k], dp[!now][j][k - 1] + u[i]);
      }
    }
  }
  printf("%.12lf\n", dp[now][a][b]);
  return 0;
}
