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 == 0: continue wgt += B[i]; val += C[i] if wgt > W: continue ans = max(ans, val + A[min(W - wgt, N)]) print(ans)