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()
A.append(0)
A.reverse()

for i in range(len(A)-1):
    A[i+1] += A[i]

ans = 0
for bit in range(2**M):

    nw = 0
    nc = 0
    for i in range(M):
        if (1<<i) & bit:
            nw += B[i]
            nc += C[i]

    #print (nw,nc,A)
    remw = W - nw
    if remw >= 0:
        nc += A[min(remw , len(A)-1)]

        ans = max(ans , nc)

print (ans)