#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int n, p, q;
double a[N], b[N], c[N], f[N][N];
inline void upd(double& x, const double& y) { x < y ? x = y : 0; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) cin >> b[i], c[i] = a[i] + b[i] - a[i] * b[i];
  for (int i = 1; i <= n; ++i)
    for (int j = min(p, i - 1); j >= 0 && j >= i - 1 - (n - p); --j)
      for (int k = min(q, i - 1); k >= 0 && k >= i - 1 - (n - q); --k) {
        upd(f[j + 1][k], f[j][k] + a[i]);
        upd(f[j][k + 1], f[j][k] + b[i]);
        upd(f[j + 1][k + 1], f[j][k] + c[i]);
      }
  cout << f[p][q] << '\n';
  return 0;
}
