#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; //B(n,V(n)) int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n,m,w; cin>>n>>m>>w; V A(n),B(m),C(m); rep(i,n) cin>>A[i]; rep(i,m) cin>>B[i]; rep(i,m) cin>>C[i]; sort(ALL(A)); reverse(ALL(A)); V S(n+1); rep(i,n) S[i+1]=S[i]+A[i]; ll ans=0; for(int bit=0;bit<(1<w) continue; ans=max(ans,c+S[min(w-b,n)]); } cout<