#include <bits/stdc++.h>
using namespace std;
int n, a, b;
double p1[(int)2e3 + 5], p2[(int)2e3 + 5], p3[(int)2e3 + 5],
    dp[(int)2e3 + 5][(int)2e3 + 5];
int optimal[(int)2e3 + 5][(int)2e3 + 5];
int get(double cost) {
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= a; j++) {
      double &ret = dp[i][j];
      int &opt = optimal[i][j];
      ret = dp[i - 1][j];
      opt = 0;
      if (j && ret < dp[i - 1][j - 1] + p1[i]) {
        ret = dp[i - 1][j - 1] + p1[i];
        opt = 1;
      }
      if (ret < dp[i - 1][j] + p2[i] - cost) {
        ret = dp[i - 1][j] + p2[i] - cost;
        opt = 2;
      }
      if (j && ret < dp[i - 1][j - 1] + p3[i] - cost) {
        ret = dp[i - 1][j - 1] + p3[i] - cost;
        opt = 3;
      }
    }
  int res = 0, j = a;
  for (int i = n; i > 0; i--) {
    if (optimal[i][j] > 1) res++;
    if (optimal[i][j] & 1) j--;
  }
  return res;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) scanf("%lf", &p1[i]);
  for (int i = 1; i <= n; i++) scanf("%lf", &p2[i]);
  for (int i = 1; i <= n; i++) p3[i] = p1[i] + p2[i] - p1[i] * p2[i];
  double l = 0, r = 1;
  for (int i = 0; i < 50; i++) {
    double mid = (l + r) / 2;
    if (get(mid) > b)
      l = mid;
    else
      r = mid;
  }
  int used = get(r);
  printf("%.10f\n", dp[n][a] + b * r);
  return 0;
}
