N,M,W=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) C=list(map(int,input().split())) A.sort(reverse=True) A=[0]+A for i in range(2,len(A)): A[i]+=A[i-1] ans=0 for i in range(2**M): cost=0 value=0 for j in range(M): if i&1>0: cost+=B[j] value+=C[j] i>>=1 if cost<=W: tmp=value+A[min(len(A)-1,W-cost)] ans=max(ans,tmp) print(ans)