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())) S = [0] * N A.sort(reverse = True) S[0] = A[0] for i in range(1,N): S[i] = A[i] + S[i-1] l = [(0,0)] for i in range(M): ll = [] b = B[i] c = C[i] for w,cc in l: if w + b <= W: ll.append((w + b,cc + c)) l += ll ans = 0 for w,c in l: u = W - w tmp = c if 1 <= u <= N: tmp += S[u-1] #if tmp > ans:ans = tmp elif u == 0: pass else: tmp += S[-1] if tmp > ans:ans = tmp print(ans)