/*  -*- coding: utf-8 -*-
 *
 * 1588.cc: Potatoes
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 15;
const int MAX_M = 10000;
const int MAX_K = 3;

/* typedef */

typedef vector<int> vi;
typedef pair<int,int> pii;

/* global variables */

pii ps[MAX_N];

/* subroutines */

void comb(int u, int k, int n, int bits, vi &cs) {
  if (k <= 0) {
    cs.push_back(bits);
    return;
  }
  if (u >= n) return;

  for (int i = u, bi = 1 << i; i < n; i++, bi <<= 1)
    comb(i + 1, k - 1, n, bits | bi, cs);
}

inline void setmax(int &a, int b) { if (a < b) a = b; }

/* main */

int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);

  for (int i = 0; i < n; i++) scanf("%d", &ps[i].first);
  for (int i = 0; i < n; i++) scanf("%d", &ps[i].second);
  sort(ps, ps + n);

  vi cs;
  comb(0, k, n, 0, cs);
  //printf("%lu\n", cs.size());

  int maxsum = 0;
  for (vi::iterator vit = cs.begin(); vit != cs.end(); vit++) {
    int &bits = *vit;
    int sum = 0, r = m;
    for (int i = n - 1, bi = 1 << i; i >= 0; i--, bi >>= 1)
      if (bits & bi) {
	int c = min(r, ps[i].second);
	sum += c * ps[i].first;
	r -= c;
      }

    setmax(maxsum, sum + r);
  }

  printf("%d\n", maxsum);
  return 0;
}

