from itertools import accumulate 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) A = list(accumulate(A, initial=0)) ans = 0 for S in range(1<>i&1) if wgt > W: continue val = sum(c for i, c in enumerate(C) if S>>i&1) ans = max(ans, val + A[min(W - wgt, N)]) print(ans)