#include <bits/stdc++.h>

typedef long long LL;
typedef __int128 LLL;

const int N = 10;
const int MOD = 998244353;

int main() {

  int n, m;
  LL k;
  scanf("%d%d%lld", &n, &m, &k);

  std::vector<LL> a(n);
  for(LL &v: a)
    scanf("%lld", &v);
  std::sort(a.begin(), a.end(), std::greater<LL>());
  a.insert(a.begin(), 0);
  for(int i = 1; i < a.size(); ++i)
    a[i] += a[i - 1];

  std::vector<std::pair<int, int>> b(m);
  for(auto &[x, y]: b)
    scanf("%d", &y);
  for(auto &[x, y]: b)
    scanf("%d", &x);
  
  LL ans = 0;
  for(int i = 0; i < (1 << m); ++i) {
    LL v = 0, w = 0;
    for(int j = 0; j < m; ++j)
      if(i >> j & 1)
	v += b[j].first, w += b[j].second;
    if(w <= k) 
      ans = std::max(ans, v + (k - w < a.size() ? a[k - w] : a.back()));
  }
  
  printf("%lld\n", ans);
  
  return 0;

}