from itertools import accumulate N, M, W = map(int, input().split()) A = list(accumulate(sorted(map(int, input().split()), reverse=True), initial=0)) B = list(map(int, input().split())) C = list(map(int, input().split())) 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)