#include <bits/stdc++.h>
using namespace std;
int n, a, b, trace[2007][2007];
double x[2007], y[2007], dp[2007][2007];
bool check(double sub) {
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= a; j++) {
      dp[i][j] = -1e9;
      trace[i][j] = -1e9;
    }
  }
  dp[0][0] = 0;
  trace[0][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= a; j++) {
      dp[i][j] = dp[i - 1][j];
      trace[i][j] = trace[i - 1][j];
      if (dp[i][j] <= dp[i - 1][j] + y[i] - sub) {
        if (dp[i][j] == dp[i - 1][j] + y[i] - sub) {
          trace[i][j] = min(trace[i][j], trace[i - 1][j] + 1);
        } else {
          trace[i][j] = trace[i - 1][j] + 1;
        }
        dp[i][j] = dp[i - 1][j] + y[i] - sub;
      }
      if (j > 0 && dp[i][j] <= dp[i - 1][j - 1] + x[i]) {
        if (dp[i][j] == dp[i - 1][j - 1] + x[i]) {
          trace[i][j] = min(trace[i][j], trace[i - 1][j - 1]);
        } else {
          trace[i][j] = trace[i - 1][j - 1];
        }
        dp[i][j] = dp[i - 1][j - 1] + x[i];
      }
      if (j > 0 &&
          dp[i][j] <= dp[i - 1][j - 1] + x[i] + y[i] - x[i] * y[i] - sub) {
        if (dp[i][j] == dp[i - 1][j - 1] + x[i] + y[i] - x[i] * y[i] - sub) {
          trace[i][j] = min(trace[i][j], trace[i - 1][j - 1] + 1);
        } else {
          trace[i][j] = trace[i - 1][j - 1] + 1;
        }
        dp[i][j] = dp[i - 1][j - 1] + x[i] + y[i] - x[i] * y[i] - sub;
      }
    }
  }
  if (trace[n][a] <= b)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> y[i];
  }
  double l = 0, r = 1;
  for (int t = 1; t <= 100; t++) {
    double mid = (l + r) / 2.0;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  cout << (fixed) << setprecision(10) << dp[n][a] + b * r;
}
