#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
int n, p, q;
double a[MAXN], b[MAXN];
double dp[MAXN][MAXN];
int trk[MAXN][MAXN];
void upd(int x, int y, double val, int cnt) {
  if (dp[x][y] > val) {
    dp[x][y] = val;
    trk[x][y] = cnt;
  }
}
pair<double, int> trial(double K) {
  fill(dp[0] + 1, dp[0] + n + 1, 1e9);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= p; j++) {
      dp[i][j] = 1e9;
      upd(i, j, dp[i - 1][j] + 1, trk[i - 1][j]);
      if (j > 0) upd(i, j, dp[i - 1][j - 1] + a[i], trk[i - 1][j - 1]);
      upd(i, j, dp[i - 1][j] + b[i] + K, trk[i - 1][j] + 1);
      if (j > 0)
        upd(i, j, dp[i - 1][j - 1] + a[i] * b[i] + K, trk[i - 1][j - 1] + 1);
    }
  }
  int pos = min_element(dp[n], dp[n] + p + 1) - dp[n];
  return make_pair(dp[n][pos], trk[n][pos]);
}
int main() {
  scanf("%d %d %d", &n, &p, &q);
  for (int i = 1; i <= n; i++) cin >> a[i], a[i] = 1 - a[i];
  for (int i = 1; i <= n; i++) cin >> b[i], b[i] = 1 - b[i];
  double s = -10, e = 10;
  for (int i = 0; i < 80; i++) {
    double m = (s + e) / 2;
    if (trial(m).second <= q)
      e = m;
    else
      s = m;
  }
  printf("%.10f\n", n - (trial(s).first - q * s));
}
