from itertools import accumulate, product

N, M, W = map(int,input().split())
A = sorted(map(int,input().split()), reverse=True)
B = list(map(int,input().split()))
C = list(map(int,input().split()))

BC = [[b, c] for b, c in zip(B, C)]

acc = [0] + list(accumulate(A))

ans = 0
for bit in product([0, 1], repeat=M):
    w = 0; p = 0
    for i in range(M):
        if bit[i]:
            w += BC[i][0]
            p += BC[i][1]
    if w > W:
        continue
    ans = max(ans, p + acc[min(N, W-w)])

print(ans)