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)
sa = [0]
for ai in a:
    sa.append(sa[-1] + ai)

ans = 0

for i in range(1 << m):
    weight, value = 0, 0
    for j in range(m):
        if i & (1 << j):
            weight += b[j]
            value += c[j]

    if weight > w:
        continue

    value += sa[min(w - weight, n)]
    ans = max(ans, value)

print(ans)