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) cums = [0] for a in A: cums.append(cums[-1] + a) ans = 0 for b in range(1<<M): w = v = 0 for i in range(M): if b&(1<<i): w += B[i] v += C[i] if w > W: break else: rem = min(W - w, N) ans = max(ans, cums[rem] + v) print(ans)